Skip to content 

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
blobManager IBlobManager | undefined
branch string
clientDetails IClientDetails
clientId string | undefined
closeFn (error?: ICriticalContainerError) => void
codeLoader ICodeLoader
configuration IFluidConfiguration
connected boolean
deltaManager IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
existing boolean | undefined
id string
loader ILoader
logger ITelemetryLogger
options any
parentBranch string | null
previousRuntimeState IRuntimeState
quorum IQuorum
scope IFluidObject Ambient services provided with the context
serviceConfiguration IServiceConfiguration | undefined
snapshotFn (message: string) => Promise
storage IDocumentStorageService | undefined | null
submitFn (type: MessageType, contents: any, batch: boolean, appData?: any) => number
submitSignalFn (contents: any) => void
version string

Methods

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

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;

blobManager

Signature:

readonly blobManager: IBlobManager | undefined;

branch

Signature:

readonly branch: string;

clientDetails

Signature:

readonly clientDetails: IClientDetails;

clientId

Signature:

readonly clientId: string | undefined;

closeFn

Signature:

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

codeLoader

Signature:

readonly codeLoader: ICodeLoader;

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: any;

parentBranch

Signature:

readonly parentBranch: string | null;

previousRuntimeState

Signature:

readonly previousRuntimeState: IRuntimeState;

quorum

Signature:

readonly quorum: IQuorum;

scope

Ambient services provided with the context

Signature:

readonly scope: IFluidObject;

serviceConfiguration

Signature:

readonly serviceConfiguration: IServiceConfiguration | undefined;

snapshotFn

Signature:

readonly snapshotFn: (message: string) => Promise<void>;

storage

Signature:

readonly storage: IDocumentStorageService | undefined | null;

submitFn

Signature:

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

submitSignalFn

Signature:

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

version

Signature:

readonly version: string;

Methods

createSummary

Signature:

createSummary(): ISummaryTree;

Returns:

ISummaryTree

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

reloadContext

Signature:

reloadContext(): Promise<void>;

Returns:

Promise<void>

requestSnapshot

Signature:

requestSnapshot(tagMessage: string): Promise<void>;

Parameters

List of parameters
Parameter Type Description
tagMessage string

Returns:

Promise<void>