Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IManager

Object which manages kernel instances for a given base url.

Notes

The manager is responsible for maintaining the state of running kernels through polling the server. Use a manager if you want to be notified of changes to kernels.

Hierarchy

Implemented by

Index

Properties

connectionFailure

connectionFailure: ISignal<IManager, NetworkError>

A signal emitted when there is a server API connection failure.

Readonly disposed

disposed: ISignal<IManager, void>

A signal emitted when the object is disposed.

Readonly isDisposed

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

Readonly isReady

isReady: boolean

Whether the manager is ready.

Readonly ready

ready: Promise<void>

A promise that resolves when the manager is initially ready.

runningChanged

runningChanged: ISignal<IManager, IModel[]>

A signal emitted when the running kernels change.

Readonly serverSettings

serverSettings: ISettings

The server settings for the manager.

Methods

connectTo

  • Connect to an existing kernel.

    Parameters

    Returns IKernelConnection

    A promise that resolves with the new kernel 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>
  • Find a kernel by id.

    Parameters

    • id: string

      The id of the target kernel.

    Returns Promise<IModel>

    A promise that resolves with the kernel's model, or undefined if not found.

refreshRunning

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

    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 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

  • startNew(createOptions?: Partial<Pick<IModel, "name">>, connectOptions?: Pick<IOptions, "clientId" | "username" | "handleComms">): Promise<IKernelConnection>
  • Start a new kernel.

    Parameters

    • Optional createOptions: Partial<Pick<IModel, "name">>

      The kernel creation options

    • Optional connectOptions: Pick<IOptions, "clientId" | "username" | "handleComms">

      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