Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IManager

Object which manages session instances.

Notes

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

Hierarchy

  • IDisposable
    • IManager

Implemented by

Index

Properties

connectionFailure

connectionFailure: ISignal<IManager, NetworkError>

A signal emitted when there is a connection failure.

Readonly isDisposed

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

Readonly isReady

isReady: boolean

Test whether the manager is ready.

Readonly ready

ready: Promise<void>

A promise that is fulfilled when the manager is ready.

runningChanged

runningChanged: ISignal<this, IModel[]>

A signal emitted when the running sessions change.

Optional serverSettings

serverSettings: ISettings

The server settings for the manager.

Methods

connectTo

  • Connect to a running session.

    Parameters

    • options: Omit<IOptions, "connectToKernel" | "serverSettings">

      The session options to use.

    Returns ISessionConnection

    The new session instance.

dispose

  • dispose(): void
  • 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

findById

  • findById(id: string): Promise<IModel | undefined>
  • Find a session by id.

    Parameters

    • id: string

      The id of the target session.

    Returns Promise<IModel | undefined>

    A promise that resolves with the session's model.

findByPath

  • findByPath(path: string): Promise<IModel | undefined>
  • Find a session by path.

    Parameters

    • path: string

      The path of the target session.

    Returns Promise<IModel | undefined>

    A promise that resolves with the session's model.

refreshRunning

  • refreshRunning(): Promise<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.

running

  • running(): IIterator<IModel>
  • Create an iterator over the known running sessions.

    Returns IIterator<IModel>

    A new iterator over the running sessions.

shutdown

  • shutdown(id: string): Promise<void>
  • Shut down a session by id.

    Parameters

    • id: string

      The id of the target kernel.

    Returns Promise<void>

    A promise that resolves when the operation is complete.

shutdownAll

  • shutdownAll(): Promise<void>
  • Shut down all sessions.

    Returns Promise<void>

    A promise that resolves when all of the sessions are shut down.

startNew

  • Start a new session.

    Parameters

    • createOptions: ISessionOptions

      Options for creating the session

    • Optional connectOptions: Omit<IOptions, "model" | "connectToKernel" | "serverSettings">

      Options for connecting to the session

    Returns Promise<ISessionConnection>

    A promise that resolves with a session connection instance.

    Notes

    The serverSettings and connectToKernel options of the manager will be used.

stopIfNeeded

  • stopIfNeeded(path: string): Promise<void>
  • 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.

Generated using TypeDoc