UNPKG

@eclipse-emfcloud/model-service-theia

Version:
34 lines 1.97 kB
import { ModelHubSubscription } from '@eclipse-emfcloud/model-service'; import { Diagnostic } from '@eclipse-emfcloud/model-validation'; import { RpcServer } from '@theia/core'; import { ModelHubClient, ModelHubProtocol, ModelServiceSubscriptionToken } from '../common'; import { ModelHubTracker } from '../common/model-hub-tracker'; import { ModelHubProvider } from './model-hub-provider'; export declare class ModelHubServer<K = string> implements ModelHubProtocol<K>, RpcServer<ModelHubClient<K>> { protected readonly modelHub: ModelHubProvider<K>; protected readonly modelHubTracker: ModelHubTracker; private clientTrackingSub?; protected client: ModelHubClient<K> | undefined; protected readonly subscriptionTokens: Map<number, ModelHubSubscriptionEntry<K>>; private nextSubscriptionId; dispose(): void; protected disposeSubscriptions(): void; setClient(client: ModelHubClient<K> | undefined): void; getClient(): ModelHubClient<K> | undefined; getModel<M extends object = object>(context: string, modelId: K): Promise<M>; subscribe(context: string, ...modelIds: K[]): Promise<ModelServiceSubscriptionToken<K>>; closeSubscription(token: ModelServiceSubscriptionToken<K>): Promise<void>; validateModels(context: string, ...modelIds: K[]): Promise<Diagnostic>; getValidationState(context: string, ...modelIds: K[]): Promise<Diagnostic | undefined>; save(context: string, ...commandStackIds: string[]): Promise<boolean>; isDirty(context: string, commandStackId: string): Promise<boolean>; undo(context: string, commandStackId: string): Promise<boolean>; redo(context: string, commandStackId: string): Promise<boolean>; flush(context: string, commandStackId: string): Promise<boolean>; } interface ModelHubSubscriptionEntry<K = string> { token: ModelServiceSubscriptionToken<K>; subscription: ModelHubSubscription<K>; } export {}; //# sourceMappingURL=model-hub-server.d.ts.map