IContainerContext Interface

Packages > @fluidframework/container-definitions > IContainerContext

The ContainerContext is a proxy standing between the Container and the Container’s IRuntime. This allows the Container to terminate the connection to the IRuntime.

Specifically, there is an event on Container, onContextChanged, which mean a new code proposal has been loaded, so the old IRuntime is no longer valid, as its ContainerContext has been revoked, and the Container has created a new ContainerContext.

Signature:

export interface IContainerContext extends IDisposable 

Extends: IDisposable

Properties

List of properties of this interface
Property Type Description
attachState AttachState Indicates the attachment state of the container to a host service.
audience IAudience | undefined
baseSnapshot ISnapshotTree | undefined
clientDetails IClientDetails
clientId string | undefined
closeFn (error?: ICriticalContainerError) => void
configuration IFluidConfiguration
connected boolean
deltaManager IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
existing boolean | undefined
id string
loader ILoader
logger ITelemetryLogger
options ILoaderOptions
pendingLocalState unknown
quorum IQuorum
scope IFluidObject Ambient services provided with the context
serviceConfiguration IClientConfiguration | undefined
storage IDocumentStorageService | undefined
submitFn (type: MessageType, contents: any, batch: boolean, appData?: any) => number
submitSignalFn (contents: any) => void

Methods

List of methods of this class
Method Description
getAbsoluteUrl(relativeUrl) Get an absolute url for a provided container-relative request.
getLoadedFromVersion()
raiseContainerWarning(warning)
updateDirtyContainerState(dirty)

Events

attachState

Indicates the attachment state of the container to a host service.

Signature:

readonly attachState: AttachState;

audience

Signature:

readonly audience: IAudience | undefined;

baseSnapshot

Signature:

readonly baseSnapshot: ISnapshotTree | undefined;

clientDetails

Signature:

readonly clientDetails: IClientDetails;

clientId

Signature:

readonly clientId: string | undefined;

closeFn

Signature:

readonly closeFn: (error?: ICriticalContainerError) => void;

configuration

Signature:

readonly configuration: IFluidConfiguration;

connected

Signature:

readonly connected: boolean;

deltaManager

Signature:

readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;

existing

Signature:

readonly existing: boolean | undefined;

id

Signature:

readonly id: string;

loader

Signature:

readonly loader: ILoader;

logger

Signature:

readonly logger: ITelemetryLogger;

options

Signature:

readonly options: ILoaderOptions;

pendingLocalState

Signature:

pendingLocalState?: unknown;

quorum

Signature:

readonly quorum: IQuorum;

scope

Ambient services provided with the context

Signature:

readonly scope: IFluidObject;

serviceConfiguration

Signature:

readonly serviceConfiguration: IClientConfiguration | undefined;

storage

Signature:

readonly storage: IDocumentStorageService | undefined;

submitFn

Signature:

readonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;

submitSignalFn

Signature:

readonly submitSignalFn: (contents: any) => void;

Methods

getAbsoluteUrl

Get an absolute url for a provided container-relative request.

Signature:

getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;

Parameters

List of parameters
Parameter Type Description
relativeUrl string A relative request within the containerTODO: Optional for backwards compatibility. Make non-optional in version 0.19

Returns:

Promise<string | undefined>

getLoadedFromVersion

Signature:

getLoadedFromVersion(): IVersion | undefined;

Returns:

IVersion | undefined

raiseContainerWarning

Signature:

raiseContainerWarning(warning: ContainerWarning): void;

Parameters

List of parameters
Parameter Type Description
warning ContainerWarning

Returns:

void

updateDirtyContainerState

Signature:

updateDirtyContainerState(dirty: boolean): void;

Parameters

List of parameters
Parameter Type Description
dirty boolean

Returns:

void