Object which manages session instances.

Notes

The manager is responsible for maintaining the state of running sessions.

interface IManager {
    connectionFailure: ISignal<Session.IManager, NetworkError>;
    isDisposed: boolean;
    isReady: boolean;
    ready: Promise<void>;
    runningChanged: ISignal<Session.IManager, Session.IModel[]>;
    serverSettings?: ServerConnection.ISettings;
    connectTo(options): ISessionConnection;
    dispose(): void;
    findById(id): Promise<undefined | Session.IModel>;
    findByPath(path): Promise<undefined | Session.IModel>;
    refreshRunning(): Promise<void>;
    running(): IterableIterator<Session.IModel>;
    shutdown(id): Promise<void>;
    shutdownAll(): Promise<void>;
    startNew(createOptions, connectOptions?): Promise<ISessionConnection>;
    stopIfNeeded(path): Promise<void>;
}

Hierarchy

Implemented by

Properties

connectionFailure: ISignal<Session.IManager, NetworkError>

A signal emitted when there is a connection failure.

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

isReady: boolean

Test whether the manager is ready.

ready: Promise<void>

A promise that is fulfilled when the manager is ready.

runningChanged: ISignal<Session.IManager, Session.IModel[]>

A signal emitted when the running sessions change.

serverSettings?: ServerConnection.ISettings

The server settings for the manager.

Methods

  • Dispose of the resources held by the object.

    Notes

    If the object's dispose method is called more than once, all calls made after the first will be a no-op.

    Undefined Behavior

    It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.

    Returns void

  • Force a refresh of the running sessions.

    Returns Promise<void>

    A promise that resolves when the models are refreshed.

    Notes

    This is intended to be called only in response to a user action, since the manager maintains its internal state.

  • Find a session associated with a path and stop it is the only session using that kernel.

    Parameters

    • path: string

      The path in question.

    Returns Promise<void>

    A promise that resolves when the relevant sessions are stopped.