UNPKG

2.1 kBTypeScriptView Raw
1import { IObservableDisposable } from '@lumino/disposable';
2import { ISignal } from '@lumino/signaling';
3import { ServerConnection } from './serverconnection';
4/**
5 * Object which manages kernel instances for a given base url.
6 *
7 * #### Notes
8 * The manager is responsible for maintaining the state of kernel specs.
9 */
10export interface IManager extends IObservableDisposable {
11 /**
12 * A signal emitted when there is a connection failure.
13 */
14 connectionFailure: ISignal<IManager, ServerConnection.NetworkError>;
15 /**
16 * The server settings for the manager.
17 */
18 readonly serverSettings: ServerConnection.ISettings;
19 /**
20 * Whether the manager is ready.
21 */
22 readonly isReady: boolean;
23 /**
24 * A promise that resolves when the manager is initially ready.
25 */
26 readonly ready: Promise<void>;
27}
28export declare abstract class BaseManager implements IManager {
29 constructor(options: BaseManager.IOptions);
30 /**
31 * A signal emitted when the delegate is disposed.
32 */
33 get disposed(): ISignal<this, void>;
34 /**
35 * A signal emitted when there is a connection failure.
36 */
37 abstract connectionFailure: ISignal<this, Error>;
38 /**
39 * Test whether the delegate has been disposed.
40 */
41 get isDisposed(): boolean;
42 /**
43 * Test whether the manager is ready.
44 */
45 abstract isReady: boolean;
46 /**
47 * A promise that fulfills when the manager is ready.
48 */
49 abstract ready: Promise<void>;
50 /**
51 * Dispose of the delegate and invoke the callback function.
52 */
53 dispose(): void;
54 /**
55 * The server settings of the manager.
56 */
57 readonly serverSettings: ServerConnection.ISettings;
58 private _isDisposed;
59 private _disposed;
60}
61/**
62 * The namespace for `BaseManager` class statics.
63 */
64export declare namespace BaseManager {
65 /**
66 * The options used to initialize a SessionManager.
67 */
68 interface IOptions {
69 /**
70 * The server settings for the manager.
71 */
72 serverSettings?: ServerConnection.ISettings;
73 }
74}