UNPKG

4.61 kBTypeScriptView Raw
1import { IDisposable } from '@lumino/disposable';
2import { Poll } from '@lumino/polling';
3import { ISignal } from '@lumino/signaling';
4import { Builder, BuildManager } from './builder';
5import { NbConvert, NbConvertManager } from './nbconvert';
6import { Contents, ContentsManager } from './contents';
7import { KernelSpec, KernelSpecManager } from './kernelspec';
8import { Session, SessionManager } from './session';
9import { Setting, SettingManager } from './setting';
10import { Terminal, TerminalManager } from './terminal';
11import { ServerConnection } from './serverconnection';
12import { Workspace, WorkspaceManager } from './workspace';
13/**
14 * A Jupyter services manager.
15 */
16export declare class ServiceManager implements ServiceManager.IManager {
17 /**
18 * Construct a new services provider.
19 */
20 constructor(options?: ServiceManager.IOptions);
21 /**
22 * A signal emitted when there is a connection failure with the kernel.
23 */
24 get connectionFailure(): ISignal<this, Error>;
25 /**
26 * Test whether the service manager is disposed.
27 */
28 get isDisposed(): boolean;
29 /**
30 * Dispose of the resources used by the manager.
31 */
32 dispose(): void;
33 /**
34 * The server settings of the manager.
35 */
36 readonly serverSettings: ServerConnection.ISettings;
37 /**
38 * Get the session manager instance.
39 */
40 readonly sessions: SessionManager;
41 /**
42 * Get the session manager instance.
43 */
44 readonly kernelspecs: KernelSpecManager;
45 /**
46 * Get the setting manager instance.
47 */
48 readonly settings: SettingManager;
49 /**
50 * The builder for the manager.
51 */
52 readonly builder: BuildManager;
53 /**
54 * Get the contents manager instance.
55 */
56 readonly contents: ContentsManager;
57 /**
58 * Get the terminal manager instance.
59 */
60 readonly terminals: TerminalManager;
61 /**
62 * Get the workspace manager instance.
63 */
64 readonly workspaces: WorkspaceManager;
65 /**
66 * Get the nbconvert manager instance.
67 */
68 readonly nbconvert: NbConvertManager;
69 /**
70 * Test whether the manager is ready.
71 */
72 get isReady(): boolean;
73 /**
74 * A promise that fulfills when the manager is ready.
75 */
76 get ready(): Promise<void>;
77 private _onConnectionFailure;
78 private _isDisposed;
79 private _readyPromise;
80 private _connectionFailure;
81 private _isReady;
82}
83/**
84 * The namespace for `ServiceManager` statics.
85 */
86export declare namespace ServiceManager {
87 /**
88 * A service manager interface.
89 */
90 interface IManager extends IDisposable {
91 /**
92 * The builder for the manager.
93 */
94 readonly builder: Builder.IManager;
95 /**
96 * The contents manager for the manager.
97 */
98 readonly contents: Contents.IManager;
99 /**
100 * Test whether the manager is ready.
101 */
102 readonly isReady: boolean;
103 /**
104 * A promise that fulfills when the manager is initially ready.
105 */
106 readonly ready: Promise<void>;
107 /**
108 * The server settings of the manager.
109 */
110 readonly serverSettings: ServerConnection.ISettings;
111 /**
112 * The session manager for the manager.
113 */
114 readonly sessions: Session.IManager;
115 /**
116 * The session manager for the manager.
117 */
118 readonly kernelspecs: KernelSpec.IManager;
119 /**
120 * The setting manager for the manager.
121 */
122 readonly settings: Setting.IManager;
123 /**
124 * The terminals manager for the manager.
125 */
126 readonly terminals: Terminal.IManager;
127 /**
128 * The workspace manager for the manager.
129 */
130 readonly workspaces: Workspace.IManager;
131 /**
132 * The nbconvert manager for the manager.
133 */
134 readonly nbconvert: NbConvert.IManager;
135 /**
136 * A signal emitted when there is a connection failure with the server.
137 */
138 readonly connectionFailure: ISignal<IManager, Error>;
139 }
140 /**
141 * The options used to create a service manager.
142 */
143 interface IOptions {
144 /**
145 * The server settings of the manager.
146 */
147 readonly serverSettings?: ServerConnection.ISettings;
148 /**
149 * The default drive for the contents manager.
150 */
151 readonly defaultDrive?: Contents.IDrive;
152 /**
153 * When the manager stops polling the API. Defaults to `when-hidden`.
154 */
155 standby?: Poll.Standby;
156 }
157}