Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KernelManager

An implementation of a kernel manager.

Hierarchy

  • BaseManager
    • KernelManager

Implements

Index

Constructors

constructor

  • Construct a new kernel manager.

    Parameters

    • Optional options: IOptions

      The default options for kernel.

    Returns KernelManager

Properties

Private _connectionFailure

_connectionFailure: any

Private _isReady

_isReady: any

Private _kernelConnections

_kernelConnections: any

Private _models

_models: any

Private _onDisposed

_onDisposed: any

Private _onStarted

_onStarted: any

Handle a kernel starting.

Private _onStatusChanged

_onStatusChanged: any

Private _pollModels

_pollModels: any

Private _ready

_ready: any

Private _runningChanged

_runningChanged: any

Readonly serverSettings

serverSettings: ISettings

The server settings for the manager.

Accessors

connectionFailure

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

    Returns ISignal<this, Error>

disposed

  • get disposed(): ISignal<this, void>
  • A signal emitted when the delegate is disposed.

    Returns ISignal<this, void>

isDisposed

  • get isDisposed(): boolean
  • Test whether the delegate has been disposed.

    Returns boolean

isReady

  • get isReady(): boolean
  • Test whether the manager is ready.

    Returns boolean

ready

  • get ready(): Promise<void>
  • A promise that fulfills when the manager is ready.

    Returns Promise<void>

runningChanged

  • get runningChanged(): ISignal<this, IModel[]>
  • A signal emitted when the running kernels change.

    Returns ISignal<this, IModel[]>

Methods

connectTo

  • Connect to an existing kernel.

    Parameters

    • options: Omit<IOptions, "serverSettings">

    Returns IKernelConnection

    The new kernel connection.

    Notes

    This will use the manager's server settings and ignore any server settings passed in the options.

dispose

  • dispose(): void
  • Dispose of the resources used by the manager.

    Returns void

findById

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

    Parameters

    • id: string

      The id of the target kernel.

    Returns Promise<IModel | undefined>

    A promise that resolves with the kernel's model.

refreshRunning

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

    Returns Promise<void>

    A promise that resolves when the running list has been refreshed.

    Notes

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

Protected requestRunning

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

    Returns Promise<void>

running

  • running(): IIterator<IModel>
  • Create an iterator over the most recent running kernels.

    Returns IIterator<IModel>

    A new iterator over the running kernels.

shutdown

  • shutdown(id: string): Promise<void>
  • Shut down a kernel 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 kernels.

    Returns Promise<void>

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

startNew

  • Start a new kernel.

    Parameters

    • Optional createOptions: IKernelOptions

      The kernel creation options

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

      The kernel connection options

    Returns Promise<IKernelConnection>

    A promise that resolves with the kernel connection.

    Notes

    The manager serverSettings will be always be used.

Generated using TypeDoc