Options
All
  • Public
  • Public/Protected
  • All
Menu

The default implementation for a session context object. A namespace for SessionContext statics.

Hierarchy

  • SessionContext

Implements

Index

Constructors

constructor

Properties

Private _busyDisposable

_busyDisposable: IDisposable | null = null

Private _connectionStatusChanged

_connectionStatusChanged: Signal<this, "connected" | "connecting" | "disconnected"> = new Signal<this, Kernel.ConnectionStatus>(this)

Private _dialog

_dialog: Dialog<any> | null = null

Private _disposed

_disposed: Signal<this, void> = new Signal<this, void>(this)

Private _initPromise

_initPromise: PromiseDelegate<boolean> = new PromiseDelegate<boolean>()

Private _initStarted

_initStarted: PromiseDelegate<void> = new PromiseDelegate<void>()

Private _initializing

_initializing: boolean = false

Private _iopubMessage

_iopubMessage: Signal<this, IIOPubMessage<"clear_output" | "comm_close" | "comm_msg" | "comm_open" | "display_data" | "error" | "execute_input" | "execute_result" | "status" | "stream" | "update_display_data" | "debug_event">> = new Signal<this, KernelMessage.IIOPubMessage>(this)

Private _isDisposed

_isDisposed: boolean = false

Private _isReady

_isReady: boolean = false

Private _isRestarting

_isRestarting: boolean = false

Private _isTerminating

_isTerminating: boolean = false

Private _kernelChanged

_kernelChanged: Signal<this, IChangedArgs<null | IKernelConnection, null | IKernelConnection, "kernel">> = new Signal<this,Session.ISessionConnection.IKernelChangedArgs>(this)

Private _kernelPreference

_kernelPreference: IKernelPreference

Private _name

_name: string = ""

Private _path

_path: string = ""

Private _pendingKernelName

_pendingKernelName: string = ""

Private _pendingSessionRequest

_pendingSessionRequest: string = ""

Private _prevKernelName

_prevKernelName: string = ""

Private _propertyChanged

_propertyChanged: Signal<this, "path" | "name" | "type"> = new Signal<this, 'path' | 'name' | 'type'>(this)

Private _ready

_ready: PromiseDelegate<void> = new PromiseDelegate<void>()

Private _session

_session: ISessionConnection | null = null

Private _sessionChanged

_sessionChanged: Signal<this, IChangedArgs<null | ISessionConnection, null | ISessionConnection, "session">> = new Signal<this,IChangedArgs<Session.ISessionConnection | null,Session.ISessionConnection | null,'session'>>(this)

Private _setBusy

_setBusy: (() => IDisposable) | undefined

Private _statusChanged

_statusChanged: Signal<this, "unknown" | "starting" | "idle" | "busy" | "terminating" | "restarting" | "autorestarting" | "dead"> = new Signal<this, Kernel.Status>(this)

Private _type

_type: string = ""

Private _unhandledMessage

_unhandledMessage: Signal<this, IMessage<"clear_output" | "comm_close" | "comm_msg" | "comm_open" | "display_data" | "error" | "execute_input" | "execute_result" | "status" | "stream" | "update_display_data" | "debug_event" | "comm_info_reply" | "comm_info_request" | "complete_reply" | "complete_request" | "execute_reply" | "execute_request" | "history_reply" | "history_request" | "inspect_reply" | "inspect_request" | "interrupt_reply" | "interrupt_request" | "is_complete_reply" | "is_complete_request" | "kernel_info_reply" | "kernel_info_request" | "shutdown_reply" | "shutdown_request" | "debug_request" | "debug_reply" | "input_request" | "input_reply">> = new Signal<this, KernelMessage.IMessage>(this)

sessionManager

sessionManager: IManager

The session manager used by the session.

specsManager

specsManager: IManager

The kernel spec manager

Accessors

connectionStatusChanged

  • get connectionStatusChanged(): ISignal<this, Kernel.ConnectionStatus>

disposed

  • get disposed(): ISignal<this, void>

iopubMessage

isDisposed

  • get isDisposed(): boolean

isReady

  • get isReady(): boolean

isRestarting

  • get isRestarting(): boolean

isTerminating

  • get isTerminating(): boolean

kernelChanged

  • get kernelChanged(): ISignal<this, Session.ISessionConnection.IKernelChangedArgs>

kernelDisplayName

  • get kernelDisplayName(): string

kernelDisplayStatus

kernelPreference

name

  • get name(): string

path

  • get path(): string

prevKernelName

  • get prevKernelName(): string

propertyChanged

  • get propertyChanged(): ISignal<this, "path" | "name" | "type">

ready

  • get ready(): Promise<void>

session

sessionChanged

statusChanged

  • get statusChanged(): ISignal<this, Kernel.Status>

type

  • get type(): string

unhandledMessage

  • get unhandledMessage(): ISignal<this, IMessage>

Methods

Private _changeKernel

Private _handleNewSession

Private _handleSessionError

_initialize

  • _initialize(): Promise<boolean>

Private _onConnectionStatusChanged

  • _onConnectionStatusChanged(sender: ISessionConnection, status: Kernel.ConnectionStatus): void

Private _onIopubMessage

Private _onKernelChanged

  • _onKernelChanged(sender: ISessionConnection, args: Session.ISessionConnection.IKernelChangedArgs): void

Private _onPropertyChanged

  • _onPropertyChanged(sender: ISessionConnection, property: "path" | "name" | "type"): void

Private _onSessionDisposed

  • _onSessionDisposed(): void

Private _onStatusChanged

Private _onUnhandledMessage

Private _shutdownSession

  • _shutdownSession(): Promise<void>

Private _startIfNecessary

  • _startIfNecessary(): Promise<boolean>

changeKernel

dispose

  • dispose(): void

initialize

  • initialize(): Promise<boolean>
  • 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.

restartKernel

  • restartKernel(): Promise<void>

shutdown

  • shutdown(): Promise<void>

Static getDefaultKernel

Generated using TypeDoc