OdspDocumentServiceFactoryCore Class
Factory for creating the sharepoint document service. Use this if you want to use the sharepoint implementation.
This constructor should be used by environments that support dynamic imports and that wish to leverage code splitting as a means to keep bundles as small as possible. \
To use, import via @fluidframework/odsp-driver/legacy
.
For more information about our API support guarantees, see here.
Signature
export declare class OdspDocumentServiceFactoryCore implements IDocumentServiceFactory, IRelaySessionAwareDriverFactory
Implements: IDocumentServiceFactory, IRelaySessionAwareDriverFactory
Constructors
Constructor | Alerts | Description |
---|---|---|
(constructor)(getStorageToken, getWebsocketToken, persistedCache, hostPolicy) | Beta |
Constructs a new instance of the OdspDocumentServiceFactoryCore class |
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
ILayerCompatDetails | Beta |
optional , readonly |
unknown | The compatibility details of the ODSP Driver layer that is exposed to the Loader layer for validating Loader-Driver compatibility. |
IRelaySessionAwareDriverFactory | Beta |
readonly |
this | |
persistedCache | Beta |
IPersistedCache | ||
snapshotPrefetchResultCache | Beta |
readonly |
PromiseCache<string, IPrefetchSnapshotContents> |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
createContainer(createNewSummary, createNewResolvedUrl, logger, clientIsSummarizer) | Beta |
Promise<IDocumentService> | |
createDocumentService(resolvedUrl, logger, clientIsSummarizer) | Beta |
Promise<IDocumentService> | |
createDocumentServiceCore(resolvedUrl, odspLogger, cacheAndTrackerArg, clientIsSummarizer) | Beta |
Promise<IDocumentService> | |
getRelayServiceSessionInfo(resolvedUrl) | Beta |
Promise<ISocketStorageDiscovery | undefined> | This function would return info about relay service session only if this factory established (or attempted to establish) connection very recently. Otherwise, it will return undefined. |
Constructor Details
(constructor)
Constructs a new instance of the OdspDocumentServiceFactoryCore
class
For more information about our API support guarantees, see here.
Signature
constructor(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy);
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
getStorageToken | TokenFetcher<OdspResourceTokenFetchOptions> | function that can provide the storage token for a given site. This is is also referred to as the "Vroom" token in SPO. | |
getWebsocketToken | TokenFetcher<OdspResourceTokenFetchOptions> | undefined | function that can provide a token for accessing the web socket. This is also to as the "Push" token in SPO. If undefined then websocket token is expected to be returned with joinSession response payload. | |
persistedCache | optional | IPersistedCache | PersistedCache provided by host for use in this session. |
hostPolicy | optional | HostStoragePolicy | Policy for storage provided by host. |
Property Details
ILayerCompatDetails
The compatibility details of the ODSP Driver layer that is exposed to the Loader layer for validating Loader-Driver compatibility.
For more information about our API support guarantees, see here.
Signature
readonly ILayerCompatDetails?: unknown;
Type: unknown
Remarks
This is for internal use only. The type of this should be ILayerCompatDetails. However, ILayerCompatDetails is internal and this class is currently marked as legacy alpha. So, using unknown here.
IRelaySessionAwareDriverFactory
For more information about our API support guarantees, see here.
Signature
get IRelaySessionAwareDriverFactory(): this;
Type: this
persistedCache
For more information about our API support guarantees, see here.
Signature
protected persistedCache: IPersistedCache;
Type: IPersistedCache
snapshotPrefetchResultCache
For more information about our API support guarantees, see here.
Signature
get snapshotPrefetchResultCache(): PromiseCache<string, IPrefetchSnapshotContents>;
Type: PromiseCache<string, IPrefetchSnapshotContents>
Method Details
createContainer
For more information about our API support guarantees, see here.
Signature
createContainer(createNewSummary: ISummaryTree | undefined, createNewResolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
createNewSummary | ISummaryTree | undefined | ||
createNewResolvedUrl | IResolvedUrl | ||
logger | optional | ITelemetryBaseLogger | |
clientIsSummarizer | optional | boolean |
Returns
Return type: Promise<IDocumentService>
createDocumentService
For more information about our API support guarantees, see here.
Signature
createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
resolvedUrl | IResolvedUrl | ||
logger | optional | ITelemetryBaseLogger | |
clientIsSummarizer | optional | boolean |
Returns
Return type: Promise<IDocumentService>
createDocumentServiceCore
For more information about our API support guarantees, see here.
Signature
protected createDocumentServiceCore(resolvedUrl: IResolvedUrl, odspLogger: ITelemetryBaseLogger, cacheAndTrackerArg?: ICacheAndTracker, clientIsSummarizer?: boolean): Promise<IDocumentService>;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
resolvedUrl | IResolvedUrl | ||
odspLogger | ITelemetryBaseLogger | ||
cacheAndTrackerArg | optional | ICacheAndTracker | |
clientIsSummarizer | optional | boolean |
Returns
Return type: Promise<IDocumentService>
getRelayServiceSessionInfo
This function would return info about relay service session only if this factory established (or attempted to establish) connection very recently. Otherwise, it will return undefined.
For more information about our API support guarantees, see here.
Signature
getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
Parameters
Parameter | Type | Description |
---|---|---|
resolvedUrl | IResolvedUrl | resolved url for container |
Returns
The current join session response stored in cache. undefined
if not present.
Return type: Promise<ISocketStorageDiscovery | undefined>