Datalayer VS Code Extension - v0.0.9
    Preparing search index...

    Abstract base class for session manager implementations.

    Implements common Session.IManager interface methods that are identical across all manager types.

    This class implements the standard JupyterLab Session.IManager interface for managing notebook sessions across different execution environments.

    class MySessionManager extends BaseSessionManager {
    readonly managerType = 'custom' as const;

    async startNew(options: Session.ISessionOptions): Promise<Session.ISessionConnection> {
    // Custom session creation logic
    }
    }

    Implements

    • IManager
    Index

    Constructors

    Properties

    _activeSession: ISessionConnection = null

    Currently active session connection. Most custom managers support only one session at a time.

    _connectionFailure: Signal<BaseSessionManager, NetworkError> = ...

    Signal emitted when connection to session fails.

    _disposed: Signal<BaseSessionManager, void> = ...

    Signal emitted when manager is disposed.

    _isDisposed: boolean = false

    Disposal state flag.

    _isReady: boolean = true

    Ready state flag.

    _ready: Promise<void> = ...

    Ready promise that resolves immediately.

    _runningChanged: Signal<BaseSessionManager, IModel[]> = ...

    Signal emitted when running sessions change.

    managerType: SessionManagerType

    Type identifier for this session manager.

    serverSettings: ISettings

    Jupyter server connection settings

    Accessors

    • get connectionFailure(): ISignal<this, NetworkError>

      Signal emitted when session connection fails.

      Returns ISignal<this, NetworkError>

    Methods

    • Connect to an existing session.

      Parameters

      • _options: IOptions

        Connection options (unused in base implementation)

      Returns ISessionConnection

      Session connection

    • Find a session by ID.

      Parameters

      • id: string

        Session identifier

      Returns Promise<IModel>

      Session model if found

    • Find a session by path.

      Parameters

      • path: string

        Notebook path

      Returns Promise<IModel>

      Session model if found

    • Request the list of running sessions from the server.

      For custom managers (mock, local, Pyodide), returns the current active session. Remote managers should override this to query the actual Jupyter server.

      Returns Promise<IModel[]>

      Promise resolving to array of running session models

    • Start a new session. Must be implemented by subclasses.

      Parameters

      • options: ISessionOptions

        Session creation options

      • OptionalconnectOptions: Omit<Session.ISessionConnection.IOptions, "model" | "serverSettings">

      Returns Promise<ISessionConnection>

      Promise resolving to the new session connection

    • Stop session if needed (for compatibility).

      Parameters

      • path: string

        Notebook path

      Returns Promise<void>

    • Validate that a session with the given ID exists.

      Parameters

      • id: string

        Session ID to validate

      Returns void

      If no active session or ID doesn't match