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

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

Properties

PropertyTypeDescription
protocolName

Methods

MethodReturn TypeDescription
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

ParameterModifiersTypeDescription
tokenProviderITokenProvider
driverPoliciesoptionalPartial<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

ParameterModifiersTypeDescription
createNewSummaryISummaryTree | undefinedSummary used to create file. If undefined, an empty file will be created and a summary should be posted later, before connecting to ordering service.
resolvedUrlIResolvedUrl
loggeroptionalITelemetryBaseLoggerOptional telemetry logger to which telemetry events will be forwarded.
clientIsSummarizeroptionalbooleanWhether 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

ParameterModifiersTypeDescription
resolvedUrlIResolvedUrlEndpoint URL data. See IResolvedUrl.
loggeroptionalITelemetryBaseLoggerOptional telemetry logger to which telemetry events will be forwarded.
clientIsSummarizeroptionalbooleanWhether or not the client is the summarizer. undefined => false
sessionoptionalISession

Returns

An instance of IDocumentService.

Return type: Promise<IDocumentService>