Options
All
  • Public
  • Public/Protected
  • All
Menu

Module IClientSession

The namespace for Client Session related interfaces.

Hierarchy

  • IDisposable
    • IClientSession

Implemented by

Index

Properties

iopubMessage

iopubMessage: ISignal<this, IMessage>

A signal emitted for a kernel messages.

isDisposed

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

isReady

isReady: boolean

Whether the session is ready.

kernel

kernel: IKernelConnection | null

The current kernel associated with the document.

kernelChanged

kernelChanged: ISignal<this, IKernelChangedArgs>

A signal emitted when the kernel changes.

kernelDisplayName

kernelDisplayName: string

The display name of the kernel.

kernelPreference

kernelPreference: IKernelPreference

The kernel preference.

name

name: string

The current name associated with the client session.

path

path: string

The current path associated with the client session.

propertyChanged

propertyChanged: ISignal<this, "path" | "name" | "type">

A signal emitted when a session property changes.

ready

ready: Promise<void>

A promise that is fulfilled when the session is ready.

status

status: Kernel.Status

The current status of the client session.

statusChanged

statusChanged: ISignal<this, Kernel.Status>

A signal emitted when the kernel status changes.

terminated

terminated: ISignal<this, void>

A signal emitted when the session is shut down.

type

type: string

The type of the client session.

unhandledMessage

unhandledMessage: ISignal<this, IMessage>

A signal emitted for an unhandled kernel message.

Methods

changeKernel

  • changeKernel(options: Partial<IModel>): Promise<IKernelConnection>
  • Change the current kernel associated with the document.

    Parameters

    • options: Partial<IModel>

    Returns Promise<IKernelConnection>

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

restart

  • restart(): Promise<boolean>
  • Restart the session.

    Returns Promise<boolean>

    A promise that resolves with whether the kernel has restarted.

    Notes

    If there is a running kernel, present a dialog. If there is no kernel, we start a kernel with the last run kernel name and resolves with true. If no kernel has been started, this is a no-op, and resolves with false.

selectKernel

  • selectKernel(): Promise<void>

setName

  • setName(name: string): Promise<void>
  • Change the session name.

    Parameters

    • name: string

    Returns Promise<void>

setPath

  • setPath(path: string): Promise<void>
  • Change the session path.

    Parameters

    • path: string

      The new session path.

    Returns Promise<void>

    A promise that resolves when the session has renamed.

    Notes

    This uses the Jupyter REST API, and the response is validated. The promise is fulfilled on a valid response and rejected otherwise.

setType

  • setType(type: string): Promise<void>
  • Change the session type.

    Parameters

    • type: string

    Returns Promise<void>

shutdown

  • shutdown(): Promise<void>
  • Kill the kernel and shutdown the session.

    Returns Promise<void>

    A promise that resolves when the session is shut down.

Generated using TypeDoc