Class SessionContext

The default implementation for a session context object.

Hierarchy

  • SessionContext

Implements

Constructors

Properties

_busyDisposable: any
_changeKernel: any

Change the kernel.

_connectionStatusChanged: any
_dialog: any
_displayKernelError: any

Display kernel error

_disposed: any
_handleNewSession: any

Handle a new session object.

_handleSessionError: any

Handle an error in session startup.

_initPromise: any
_initStarted: any
_initializing: any
_iopubMessage: any
_isDisposed: any
_isReady: any
_isRestarting: any
_isTerminating: any
_kernelChanged: any
_kernelPreference: any
_name: any
_onConnectionStatusChanged: any

Handle a change to the session status.

_onIopubMessage: any

Handle an iopub message.

_onKernelChanged: any

Handle a change to the kernel.

_onPendingInput: any

Handle a change to the pending input.

_onPropertyChanged: any

Handle a change to a session property.

_onSessionDisposed: any

Handle a session termination.

_onStatusChanged: any

Handle a change to the session status.

_onUnhandledMessage: any

Handle an unhandled message.

_path: any
_pendingInput: any
_pendingKernelName: any
_pendingSessionRequest: any
_preferenceChanged: any
_prevKernelName: any
_propertyChanged: any
_ready: any
_session: any
_sessionChanged: any
_setBusy: any
_shutdownSession: any

Shut down the current session.

_startIfNecessary: any

Start the session if necessary.

Returns

Whether to ask the user to pick a kernel.

_statusChanged: any
_trans: any
_type: any
_unhandledMessage: any
sessionManager: Session.IManager

The session manager used by the session.

specsManager: KernelSpec.IManager

The kernel spec manager

translator: any

Accessors

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

    Returns ISignal<this, void>

  • get hasNoKernel(): boolean
  • Whether the kernel is "No Kernel" or not.

    Notes

    As the displayed name is translated, this can be used directly.

    Returns boolean

  • get isDisposed(): boolean
  • Test whether the context is disposed.

    Returns boolean

  • get isReady(): boolean
  • Whether the context is ready.

    Returns boolean

  • get isRestarting(): boolean
  • Whether the context is restarting.

    Returns boolean

  • get isTerminating(): boolean
  • Whether the context is terminating.

    Returns boolean

  • get kernelDisplayName(): string
  • The display name of the current kernel, or a sensible alternative.

    Notes

    This is a convenience function to have a consistent sensible name for the kernel.

    Returns string

  • get name(): string
  • The session name.

    Notes

    Typically .session.name should be used. This attribute is useful if there is no current session.

    Returns string

  • get noKernelName(): string
  • Get the constant displayed name for "No Kernel"

    Returns string

  • get path(): string
  • The session path.

    Notes

    Typically .session.path should be used. This attribute is useful if there is no current session.

    Returns string

  • get pendingInput(): boolean
  • A flag indicating if the session has ending input, proxied from the kernel.

    Returns boolean

  • get prevKernelName(): string
  • The name of the previously started kernel.

    Returns string

  • get propertyChanged(): ISignal<this, "type" | "name" | "path">
  • A signal emitted when a session property changes, proxied from the current session.

    Returns ISignal<this, "type" | "name" | "path">

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

    Returns Promise<void>

  • get type(): string
  • The session type.

    Notes

    Typically .session.type should be used. This attribute is useful if there is no current session.

    Returns string

Methods

  • Inner initialize function that doesn't handle promises. This makes it easier to consolidate promise handling logic.

    Returns Promise<boolean>

  • Dispose of the resources held by the context.

    Returns void

  • Initialize the session context

    Returns Promise<boolean>

    A promise that resolves with whether to ask the user to select a kernel.

    Notes

    If a server session exists on the current path, we will connect to it. If preferences include disabling canStart or shouldStart, no server session will be started. If a kernel id is given, we attempt to start a session with that id. If a default kernel is available, we connect to it. Otherwise we ask the user to select a kernel.

  • Restart the current Kernel.

    Returns Promise<void>

    A promise that resolves when the kernel is restarted.

  • Kill the kernel and shutdown the session.

    Returns Promise<void>

    A promise that resolves when the session is shut down.

  • Starts new Kernel.

    Returns Promise<boolean>

    Whether to ask the user to pick a kernel.

Generated using TypeDoc