1 | import { interfaces } from 'inversify';
|
2 | import { Channel, RpcProxy, RpcProxyFactory } from '../../common';
|
3 | import { ChannelMultiplexer } from '../../common/message-rpc/channel';
|
4 | import { ConnectionSource } from './connection-source';
|
5 | export declare const LocalConnectionProvider: unique symbol;
|
6 | export declare const RemoteConnectionProvider: unique symbol;
|
7 | export declare namespace ServiceConnectionProvider {
|
8 | type ConnectionHandler = (path: String, channel: Channel) => void;
|
9 | }
|
10 |
|
11 |
|
12 |
|
13 | export declare class ServiceConnectionProvider {
|
14 | static createProxy<T extends object>(container: interfaces.Container, path: string, arg?: object): RpcProxy<T>;
|
15 | static createLocalProxy<T extends object>(container: interfaces.Container, path: string, arg?: object): RpcProxy<T>;
|
16 | static createHandler(container: interfaces.Container, path: string, arg?: object): void;
|
17 | protected readonly channelHandlers: Map<string, ServiceConnectionProvider.ConnectionHandler>;
|
18 | |
19 |
|
20 |
|
21 |
|
22 | createProxy<T extends object>(path: string, factory: RpcProxyFactory<T>): RpcProxy<T>;
|
23 | |
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | createProxy<T extends object>(path: string, target?: object): RpcProxy<T>;
|
31 | protected channelMultiplexer: ChannelMultiplexer;
|
32 | private channelReadyDeferred;
|
33 | protected get channelReady(): Promise<void>;
|
34 | init(): void;
|
35 | protected connectionSource: ConnectionSource;
|
36 | |
37 |
|
38 |
|
39 |
|
40 | protected handleChannelCreated(channel: Channel): void;
|
41 | handleChannelClosed(channel: Channel): void;
|
42 | |
43 |
|
44 |
|
45 | listen(path: string, handler: ServiceConnectionProvider.ConnectionHandler, reconnect: boolean): void;
|
46 | private openChannel;
|
47 | }
|
48 |
|
\ | No newline at end of file |