Skip to main content
Version: v1

RouterliciousDocumentServiceFactory Class

Factory for creating the routerlicious document service. Use this if you want to use the routerlicious implementation.

Signature

export declare class RouterliciousDocumentServiceFactory implements IDocumentServiceFactory

Implements: IDocumentServiceFactory

Constructors

Constructor Description
(constructor)(tokenProvider, driverPolicies) Constructs a new instance of the RouterliciousDocumentServiceFactory class

Properties

Property Type Description
protocolName

Methods

Method Return Type Description
createContainer(createNewSummary, resolvedUrl, logger, clientIsSummarizer) Promise<IDocumentService> Creates a new document with the provided options. Returns the document service.
createDocumentService(resolvedUrl, logger, clientIsSummarizer, session) Promise<IDocumentService> Creates the document service after extracting different endpoints URLs from a resolved URL.

Constructor Details

(constructor)

Constructs a new instance of the RouterliciousDocumentServiceFactory class

Signature

constructor(tokenProvider: ITokenProvider, driverPolicies?: Partial<IRouterliciousDriverPolicies>);

Parameters

Parameter Modifiers Type Description
tokenProvider ITokenProvider
driverPolicies optional Partial<IRouterliciousDriverPolicies>

Property Details

protocolName

Signature

readonly protocolName = "fluid:";

Method Details

createContainer

Creates a new document with the provided options. Returns the document service.

Signature

createContainer(createNewSummary: ISummaryTree | undefined, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;

Parameters

Parameter Modifiers Type Description
createNewSummary ISummaryTree | undefined Summary used to create file. If undefined, an empty file will be created and a summary should be posted later, before connecting to ordering service.
resolvedUrl IResolvedUrl
logger optional ITelemetryBaseLogger Optional telemetry logger to which telemetry events will be forwarded.
clientIsSummarizer optional boolean Whether or not the client is the summarizer. undefined =\> false

Returns

Return type: Promise<IDocumentService>

Error Handling

DocumentPostCreateError If an exception is thrown while invoking the provided documentPostCreateCallback(documentId, creationToken).

createDocumentService

Creates the document service after extracting different endpoints URLs from a resolved URL.

Signature

createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean, session?: ISession): Promise<IDocumentService>;

Parameters

Parameter Modifiers Type Description
resolvedUrl IResolvedUrl Endpoint URL data. See IResolvedUrl.
logger optional ITelemetryBaseLogger Optional telemetry logger to which telemetry events will be forwarded.
clientIsSummarizer optional boolean Whether or not the client is the summarizer. undefined =\> false
session optional ISession

Returns

An instance of IDocumentService.

Return type: Promise<IDocumentService>