Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SessionManager

An implementation of a session manager. The namespace for SessionManager class statics.

Hierarchy

  • SessionManager

Implements

Index

Constructors

constructor

Properties

Private _connectionFailure

_connectionFailure: Signal<this, Error> = new Signal<this, Error>(this)

Private _isDisposed

_isDisposed: boolean = false

Private _isReady

_isReady: boolean = false

Private _models

_models: IModel[] = []

Private _pollModels

_pollModels: Poll

Private _pollSpecs

_pollSpecs: Poll

Private _ready

_ready: Promise<void>

Private _runningChanged

_runningChanged: Signal<this, IModel[]> = new Signal<this, Session.IModel[]>(this)

Private _sessions

_sessions: Set<ISession> = new Set<Session.ISession>()

Private _specs

_specs: ISpecModels | null = null

Private _specsChanged

_specsChanged: Signal<this, ISpecModels> = new Signal<this, Kernel.ISpecModels>(this)

serverSettings

serverSettings: ISettings

The server settings of the manager.

Accessors

connectionFailure

  • get connectionFailure(): ISignal<this, Error>
  • A signal emitted when there is a connection failure.

    Returns ISignal<this, Error>

isDisposed

  • get isDisposed(): boolean

isReady

  • get isReady(): boolean

ready

  • get ready(): Promise<void>

runningChanged

  • get runningChanged(): ISignal<this, IModel[]>

specs

specsChanged

Methods

Private _onChanged

  • _onChanged(model: IModel): void

Private _onStarted

Private _onTerminated

  • _onTerminated(id: string): void

connectTo

dispose

  • dispose(): void

findById

  • findById(id: string): Promise<IModel>

findByPath

  • findByPath(path: string): Promise<IModel>

refreshRunning

  • refreshRunning(): Promise<void>
  • Force a refresh of the running sessions.

    Returns Promise<void>

    A promise that with the list of running sessions.

    Notes

    This is not typically meant to be called by the user, since the manager maintains its own internal state.

refreshSpecs

  • refreshSpecs(): Promise<void>
  • Force a refresh of the specs from the server.

    Returns Promise<void>

    A promise that resolves when the specs are fetched.

    Notes

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

Protected requestRunning

  • requestRunning(): Promise<void>
  • Execute a request to the server to poll running kernels and update state.

    Returns Promise<void>

Protected requestSpecs

  • requestSpecs(): Promise<void>
  • Execute a request to the server to poll specs and update state.

    Returns Promise<void>

running

  • running(): IIterator<IModel>

shutdown

  • shutdown(id: string): Promise<void>

shutdownAll

  • shutdownAll(): Promise<void>

startNew

stopIfNeeded

  • stopIfNeeded(path: string): Promise<void>
  • Find a session associated with a path and stop it if 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