UNPKG

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