@openfin/core 33.76.31 → 33.76.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OpenFin.d.ts +1 -1
- package/README.md +29 -4
- package/fin.d.ts +2 -2
- package/{src → out}/GlobalOpenFin.d.ts +1 -1
- package/out/mock-alpha.d.ts +16112 -0
- package/out/mock-beta.d.ts +16112 -0
- package/out/mock-public.d.ts +16112 -0
- package/out/mock.d.ts +16797 -0
- package/out/mock.js +17104 -0
- package/package.json +30 -23
- package/LICENSE +0 -13
- package/NOTICE +0 -16
- package/openfin-core-33.76.31.tgz +0 -0
- package/src/OpenFin.d.ts +0 -3080
- package/src/OpenFin.js +0 -2
- package/src/api/api-exposer/api-consumer.d.ts +0 -28
- package/src/api/api-exposer/api-consumer.js +0 -28
- package/src/api/api-exposer/api-exposer.d.ts +0 -35
- package/src/api/api-exposer/api-exposer.js +0 -38
- package/src/api/api-exposer/decorators.d.ts +0 -10
- package/src/api/api-exposer/decorators.js +0 -18
- package/src/api/api-exposer/index.d.ts +0 -4
- package/src/api/api-exposer/index.js +0 -20
- package/src/api/api-exposer/strategies/index.d.ts +0 -1
- package/src/api/api-exposer/strategies/index.js +0 -17
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.d.ts +0 -14
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.js +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.d.ts +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.js +0 -23
- package/src/api/api-exposer/strategies/openfin-channels/index.d.ts +0 -2
- package/src/api/api-exposer/strategies/openfin-channels/index.js +0 -18
- package/src/api/application/Factory.d.ts +0 -148
- package/src/api/application/Factory.js +0 -230
- package/src/api/application/Instance.d.ts +0 -321
- package/src/api/application/Instance.js +0 -453
- package/src/api/application/index.d.ts +0 -3
- package/src/api/application/index.js +0 -19
- package/src/api/base.d.ts +0 -48
- package/src/api/base.js +0 -177
- package/src/api/clipboard/index.d.ts +0 -92
- package/src/api/clipboard/index.js +0 -120
- package/src/api/events/application.d.ts +0 -146
- package/src/api/events/application.js +0 -2
- package/src/api/events/base.d.ts +0 -42
- package/src/api/events/base.js +0 -2
- package/src/api/events/channel.d.ts +0 -30
- package/src/api/events/channel.js +0 -2
- package/src/api/events/emitterMap.d.ts +0 -11
- package/src/api/events/emitterMap.js +0 -35
- package/src/api/events/eventAggregator.d.ts +0 -5
- package/src/api/events/eventAggregator.js +0 -35
- package/src/api/events/externalApplication.d.ts +0 -19
- package/src/api/events/externalApplication.js +0 -2
- package/src/api/events/frame.d.ts +0 -30
- package/src/api/events/frame.js +0 -2
- package/src/api/events/globalHotkey.d.ts +0 -20
- package/src/api/events/globalHotkey.js +0 -2
- package/src/api/events/platform.d.ts +0 -26
- package/src/api/events/platform.js +0 -2
- package/src/api/events/system.d.ts +0 -113
- package/src/api/events/system.js +0 -2
- package/src/api/events/typedEventEmitter.d.ts +0 -20
- package/src/api/events/typedEventEmitter.js +0 -2
- package/src/api/events/view.d.ts +0 -82
- package/src/api/events/view.js +0 -2
- package/src/api/events/webcontents.d.ts +0 -266
- package/src/api/events/webcontents.js +0 -2
- package/src/api/events/window.d.ts +0 -352
- package/src/api/events/window.js +0 -2
- package/src/api/external-application/Factory.d.ts +0 -27
- package/src/api/external-application/Factory.js +0 -40
- package/src/api/external-application/Instance.d.ts +0 -102
- package/src/api/external-application/Instance.js +0 -109
- package/src/api/external-application/index.d.ts +0 -3
- package/src/api/external-application/index.js +0 -19
- package/src/api/fin.d.ts +0 -51
- package/src/api/fin.js +0 -42
- package/src/api/frame/Factory.d.ts +0 -37
- package/src/api/frame/Factory.js +0 -69
- package/src/api/frame/Instance.d.ts +0 -123
- package/src/api/frame/Instance.js +0 -130
- package/src/api/frame/index.d.ts +0 -3
- package/src/api/frame/index.js +0 -19
- package/src/api/global-hotkey/index.d.ts +0 -38
- package/src/api/global-hotkey/index.js +0 -64
- package/src/api/interappbus/channel/channel.d.ts +0 -28
- package/src/api/interappbus/channel/channel.js +0 -77
- package/src/api/interappbus/channel/channels-docs.d.ts +0 -340
- package/src/api/interappbus/channel/channels-docs.js +0 -398
- package/src/api/interappbus/channel/client.d.ts +0 -24
- package/src/api/interappbus/channel/client.js +0 -89
- package/src/api/interappbus/channel/connection-manager.d.ts +0 -29
- package/src/api/interappbus/channel/connection-manager.js +0 -246
- package/src/api/interappbus/channel/index.d.ts +0 -25
- package/src/api/interappbus/channel/index.js +0 -169
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/classic/message-receiver.js +0 -73
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/classic/strategy.js +0 -101
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +0 -20
- package/src/api/interappbus/channel/protocols/combined/strategy.js +0 -58
- package/src/api/interappbus/channel/protocols/index.d.ts +0 -47
- package/src/api/interappbus/channel/protocols/index.js +0 -2
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +0 -10
- package/src/api/interappbus/channel/protocols/protocol-manager.js +0 -43
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +0 -25
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +0 -141
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +0 -30
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -130
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +0 -85
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/strategy-types.js +0 -2
- package/src/api/interappbus/channel/protocols/strategy.d.ts +0 -17
- package/src/api/interappbus/channel/protocols/strategy.js +0 -2
- package/src/api/interappbus/channel/provider.d.ts +0 -34
- package/src/api/interappbus/channel/provider.js +0 -166
- package/src/api/interappbus/index.d.ts +0 -85
- package/src/api/interappbus/index.js +0 -175
- package/src/api/interop/Factory.d.ts +0 -37
- package/src/api/interop/Factory.js +0 -76
- package/src/api/interop/InteropBroker.d.ts +0 -437
- package/src/api/interop/InteropBroker.js +0 -1085
- package/src/api/interop/InteropClient.d.ts +0 -278
- package/src/api/interop/InteropClient.js +0 -459
- package/src/api/interop/SessionContextGroupBroker.d.ts +0 -27
- package/src/api/interop/SessionContextGroupBroker.js +0 -108
- package/src/api/interop/SessionContextGroupClient.d.ts +0 -21
- package/src/api/interop/SessionContextGroupClient.js +0 -86
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +0 -20
- package/src/api/interop/fdc3/PrivateChannelClient.js +0 -90
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +0 -55
- package/src/api/interop/fdc3/PrivateChannelProvider.js +0 -276
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +0 -208
- package/src/api/interop/fdc3/fdc3-1.2.js +0 -438
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +0 -301
- package/src/api/interop/fdc3/fdc3-2.0.js +0 -482
- package/src/api/interop/fdc3/fdc3.d.ts +0 -12
- package/src/api/interop/fdc3/fdc3.js +0 -35
- package/src/api/interop/fdc3/overrideCheck.d.ts +0 -4
- package/src/api/interop/fdc3/overrideCheck.js +0 -32
- package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +0 -53
- package/src/api/interop/fdc3/shapes/fdc3v1.js +0 -4
- package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +0 -75
- package/src/api/interop/fdc3/shapes/fdc3v2.js +0 -2
- package/src/api/interop/fdc3/utils.d.ts +0 -45
- package/src/api/interop/fdc3/utils.js +0 -239
- package/src/api/interop/fdc3/versions.d.ts +0 -1
- package/src/api/interop/fdc3/versions.js +0 -2
- package/src/api/interop/index.d.ts +0 -4
- package/src/api/interop/index.js +0 -20
- package/src/api/interop/utils.d.ts +0 -18
- package/src/api/interop/utils.js +0 -61
- package/src/api/me.d.ts +0 -40
- package/src/api/me.js +0 -134
- package/src/api/platform/Factory.d.ts +0 -115
- package/src/api/platform/Factory.js +0 -184
- package/src/api/platform/Instance.d.ts +0 -150
- package/src/api/platform/Instance.js +0 -332
- package/src/api/platform/common-utils.d.ts +0 -7
- package/src/api/platform/common-utils.js +0 -16
- package/src/api/platform/index.d.ts +0 -3
- package/src/api/platform/index.js +0 -19
- package/src/api/platform/layout/Factory.d.ts +0 -114
- package/src/api/platform/layout/Factory.js +0 -174
- package/src/api/platform/layout/Instance.d.ts +0 -57
- package/src/api/platform/layout/Instance.js +0 -126
- package/src/api/platform/layout/controllers/layout-content-cache.d.ts +0 -9
- package/src/api/platform/layout/controllers/layout-content-cache.js +0 -54
- package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +0 -119
- package/src/api/platform/layout/controllers/layout-entities-controller.js +0 -287
- package/src/api/platform/layout/entities/layout-entities.d.ts +0 -235
- package/src/api/platform/layout/entities/layout-entities.js +0 -312
- package/src/api/platform/layout/entities/shapes.d.ts +0 -6
- package/src/api/platform/layout/entities/shapes.js +0 -2
- package/src/api/platform/layout/index.d.ts +0 -2
- package/src/api/platform/layout/index.js +0 -18
- package/src/api/platform/layout/layout.constants.d.ts +0 -1
- package/src/api/platform/layout/layout.constants.js +0 -4
- package/src/api/platform/layout/shapes.d.ts +0 -16
- package/src/api/platform/layout/shapes.js +0 -2
- package/src/api/platform/layout/utils/layout-traversal.d.ts +0 -4
- package/src/api/platform/layout/utils/layout-traversal.js +0 -65
- package/src/api/platform/provider.d.ts +0 -163
- package/src/api/platform/provider.js +0 -2
- package/src/api/snapshot-source/Factory.d.ts +0 -38
- package/src/api/snapshot-source/Factory.js +0 -66
- package/src/api/snapshot-source/Instance.d.ts +0 -31
- package/src/api/snapshot-source/Instance.js +0 -132
- package/src/api/snapshot-source/index.d.ts +0 -3
- package/src/api/snapshot-source/index.js +0 -19
- package/src/api/snapshot-source/utils.d.ts +0 -2
- package/src/api/snapshot-source/utils.js +0 -6
- package/src/api/system/index.d.ts +0 -517
- package/src/api/system/index.js +0 -895
- package/src/api/view/Factory.d.ts +0 -50
- package/src/api/view/Factory.js +0 -103
- package/src/api/view/Instance.d.ts +0 -487
- package/src/api/view/Instance.js +0 -557
- package/src/api/view/index.d.ts +0 -3
- package/src/api/view/index.js +0 -19
- package/src/api/webcontents/main.d.ts +0 -32
- package/src/api/webcontents/main.js +0 -156
- package/src/api/window/Factory.d.ts +0 -45
- package/src/api/window/Factory.js +0 -91
- package/src/api/window/Instance.d.ts +0 -1090
- package/src/api/window/Instance.js +0 -1349
- package/src/api/window/index.d.ts +0 -3
- package/src/api/window/index.js +0 -19
- package/src/browser.d.ts +0 -10
- package/src/browser.js +0 -36
- package/src/environment/browser.d.ts +0 -29
- package/src/environment/browser.js +0 -60
- package/src/environment/environment.d.ts +0 -33
- package/src/environment/environment.js +0 -4
- package/src/environment/mockEnvironment.d.ts +0 -27
- package/src/environment/mockEnvironment.js +0 -61
- package/src/environment/node-env.d.ts +0 -29
- package/src/environment/node-env.js +0 -72
- package/src/fdc3.d.ts +0 -3
- package/src/fdc3.js +0 -9
- package/src/mock.d.ts +0 -3
- package/src/mock.js +0 -18
- package/src/namespaces.d.ts +0 -21
- package/src/namespaces.js +0 -24
- package/src/shapes/ERROR_BOX_TYPES.d.ts +0 -1
- package/src/shapes/ERROR_BOX_TYPES.js +0 -2
- package/src/shapes/WebOptions.d.ts +0 -13
- package/src/shapes/WebOptions.js +0 -2
- package/src/shapes/WindowOptions.d.ts +0 -43
- package/src/shapes/WindowOptions.js +0 -2
- package/src/shapes/protocol.d.ts +0 -200
- package/src/shapes/protocol.js +0 -2
- package/src/transport/mockWire.d.ts +0 -11
- package/src/transport/mockWire.js +0 -26
- package/src/transport/transport-errors.d.ts +0 -31
- package/src/transport/transport-errors.js +0 -79
- package/src/transport/transport.d.ts +0 -73
- package/src/transport/transport.js +0 -219
- package/src/transport/wire.d.ts +0 -77
- package/src/transport/wire.js +0 -36
- package/src/util/asyncFilter.d.ts +0 -1
- package/src/util/asyncFilter.js +0 -7
- package/src/util/channel-api-relay.d.ts +0 -13
- package/src/util/channel-api-relay.js +0 -47
- package/src/util/errors.d.ts +0 -10
- package/src/util/errors.js +0 -12
- package/src/util/exhaustive.d.ts +0 -1
- package/src/util/exhaustive.js +0 -7
- package/src/util/http.d.ts +0 -11
- package/src/util/http.js +0 -90
- package/src/util/inaccessibleObject.d.ts +0 -2
- package/src/util/inaccessibleObject.js +0 -49
- package/src/util/lazy.d.ts +0 -34
- package/src/util/lazy.js +0 -54
- package/src/util/normalize-config.d.ts +0 -3
- package/src/util/normalize-config.js +0 -52
- package/src/util/promises.d.ts +0 -5
- package/src/util/promises.js +0 -27
- package/src/util/ref-counter.d.ts +0 -7
- package/src/util/ref-counter.js +0 -52
- package/src/util/reversible-map.d.ts +0 -11
- package/src/util/reversible-map.js +0 -49
- package/src/util/runtimeVersioning.d.ts +0 -3
- package/src/util/runtimeVersioning.js +0 -25
- package/src/util/utilTypes.d.ts +0 -8
- package/src/util/utilTypes.js +0 -2
- package/src/util/validate.d.ts +0 -3
- package/src/util/validate.js +0 -11
|
@@ -1,398 +0,0 @@
|
|
|
1
|
-
/* eslint-disable class-methods-use-this, @typescript-eslint/no-empty-function, @typescript-eslint/explicit-function-return-type */
|
|
2
|
-
/* todo IMPORTANT PLEASE READ!
|
|
3
|
-
* Make sure any edits to the Table of Contents in the following jsdoc comment are also made to both:
|
|
4
|
-
* 1. docs home page (/docs.README.md)
|
|
5
|
-
* 2. App config web page (https://openfin.co/documentation/application-config/)
|
|
6
|
-
*/
|
|
7
|
-
const InterApplicationBus = {};
|
|
8
|
-
/**
|
|
9
|
-
* @namespace
|
|
10
|
-
* @desc The Channel namespace allows an OpenFin application to create a channel as a {@link Channel#ChannelProvider ChannelProvider},
|
|
11
|
-
* or connect to a channel as a {@link Channel#ChannelClient ChannelClient}. The "handshake" between the communication partners is
|
|
12
|
-
* simplified when using a channel. A request to connect to a channel as a client will return a promise that resolves if/when the channel has been created. Both the
|
|
13
|
-
* provider and client can dispatch actions that have been registered on their opposites, and dispatch returns a promise that resolves with a payload from the other
|
|
14
|
-
* communication participant. There can be only one provider per channel, but many clients. Version `9.61.35.*` or later is required for both communication partners.
|
|
15
|
-
*
|
|
16
|
-
* ##### Asynchronous Methods
|
|
17
|
-
* * {@link InterApplicationBus.Channel.create create(channelName, options)}
|
|
18
|
-
* * {@link InterApplicationBus.Channel.connect connect(channelName, options)}
|
|
19
|
-
* * {@link InterApplicationBus.Channel.onChannelConnect onChannelConnect(listener)}
|
|
20
|
-
* * {@link InterApplicationBus.Channel.onChannelDisconnect onChannelDisconnect(listener)}
|
|
21
|
-
*/
|
|
22
|
-
InterApplicationBus.Channel = function () { };
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* Create a new channel. Returns a promise that resolves with a {@link Channel#ChannelProvider ChannelProvider} instance for your channel.
|
|
26
|
-
* You must provide a unique channelName. If a channelName is not provided, or it is not unique, the creation will fail. EXPERIMENTAL: pass { protocols: ['rtc'] } as options to opt-in to High Throughput Channels.
|
|
27
|
-
* @param {string} channelName - Name of the channel to be created.
|
|
28
|
-
* @param {InterApplicationBus.Channel~ChannelCreateOptions} options - Creation options.
|
|
29
|
-
* @returns {Promise<Channel#ChannelProvider>} Returns promise that resolves with an instance of {@link Channel#ChannelProvider ChannelProvider}.
|
|
30
|
-
* @tutorial Channel.create
|
|
31
|
-
*/
|
|
32
|
-
InterApplicationBus.Channel.create = function () { };
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* Connect to a channel. Returns a promise for a {@link Channel#ChannelClient ChannelClient} instance for that channel.
|
|
36
|
-
* If you wish to send a payload to the provider, add a payload property to the options argument. EXPERIMENTAL: pass { protocols: ['rtc'] } as options to opt-in to High Throughput Channels.
|
|
37
|
-
* @param {string} channelName - Name of the target channel.
|
|
38
|
-
* @param {InterApplicationBus.Channel~ChannelConnectOptions} options - Connection options.
|
|
39
|
-
* @returns {Promise<Channel#ChannelClient>} Returns promise that resolves with an instance of {@link Channel#ChannelClient ChannelClient}.
|
|
40
|
-
* @tutorial Channel.connect
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
InterApplicationBus.Channel.connect = function (options) { };
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* Listens for channel connections.
|
|
47
|
-
* @param {InterApplicationBus.Channel~ConnectionEvent} listener - callback to execute.
|
|
48
|
-
* @returns {Promise<void>}
|
|
49
|
-
* @tutorial Channel.onChannelConnect
|
|
50
|
-
*/
|
|
51
|
-
InterApplicationBus.Channel.onChannelConnect = function () { };
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* Listen for channel disconnections.
|
|
55
|
-
* @param {InterApplicationBus.Channel~ConnectionEvent} listener - callback to execute.
|
|
56
|
-
* @returns {Promise<void>}
|
|
57
|
-
* @tutorial Channel.onChannelDisconnect
|
|
58
|
-
*/
|
|
59
|
-
InterApplicationBus.Channel.onChannelDisconnect = function () { };
|
|
60
|
-
/**
|
|
61
|
-
* Instance created to enable use of a channel as a provider. Allows for communication with the {@link Channel#ChannelClient ChannelClients} by invoking an action on
|
|
62
|
-
* a single client via {@link Channel#ChannelProvider#dispatch dispatch} or all clients via {@link Channel#ChannelProvider#publish publish}
|
|
63
|
-
* and to listen for communication from clients by registering an action via {@link Channel#ChannelProvider#register register}.
|
|
64
|
-
*
|
|
65
|
-
* ##### Constructor
|
|
66
|
-
*
|
|
67
|
-
* Returned by {@link InterApplicationBus.Channel.create Channel.create}.
|
|
68
|
-
*
|
|
69
|
-
* ##### Synchronous Methods
|
|
70
|
-
* * {@link Channel#ChannelProvider#onConnection onConnection(listener)}
|
|
71
|
-
* * {@link Channel#ChannelProvider#onDisconnection onDisconnection(listener)}
|
|
72
|
-
* * {@link Channel#ChannelProvider#publish publish(action, payload)}
|
|
73
|
-
* * {@link Channel#ChannelProvider#register register(action, listener)}
|
|
74
|
-
* * {@link Channel#ChannelProvider#remove remove(action)}
|
|
75
|
-
*
|
|
76
|
-
* ##### Asynchronous Methods
|
|
77
|
-
* * {@link Channel#ChannelProvider#destroy destroy()}
|
|
78
|
-
* * {@link Channel#ChannelProvider#dispatch dispatch(to, action, payload)}
|
|
79
|
-
* * {@link Channel#ChannelProvider#getAllClientInfo getAllClientInfo()}
|
|
80
|
-
*
|
|
81
|
-
* ##### Middleware
|
|
82
|
-
* Middleware functions receive the following arguments: (action, payload, senderId).
|
|
83
|
-
* The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
|
|
84
|
-
* unless it is undefined, in which case the most recently defined payload is used. Middleware can be used for side effects.
|
|
85
|
-
* * {@link Channel#ChannelProvider#setDefaultAction setDefaultAction(middleware)}
|
|
86
|
-
* * {@link Channel#ChannelProvider#onError onError(middleware)}
|
|
87
|
-
* * {@link Channel#ChannelProvider#beforeAction beforeAction(middleware)}
|
|
88
|
-
* * {@link Channel#ChannelProvider#afterAction afterAction(middleware)}
|
|
89
|
-
*
|
|
90
|
-
* @memberof! Channel#
|
|
91
|
-
* @hideconstructor
|
|
92
|
-
* @property {InterApplicationBus.Channel~ClientIdentity[]} connections a read-only array containing all the identities of connecting clients.
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
class ChannelProvider {
|
|
96
|
-
/**
|
|
97
|
-
*
|
|
98
|
-
* Destroy the channel.
|
|
99
|
-
* @returns {Promise<void>}
|
|
100
|
-
* @tutorial ChannelProvider.destroy
|
|
101
|
-
*/
|
|
102
|
-
destroy() { }
|
|
103
|
-
/**
|
|
104
|
-
*
|
|
105
|
-
* Dispatch an action to a specified client. Returns a promise for the result of executing that action on the client side.
|
|
106
|
-
* @param {InterApplicationBus.Channel~ClientIdentity} to - Identity of the target client.
|
|
107
|
-
* @param {string} action - Name of the action to be invoked by the client.
|
|
108
|
-
* @param {*} payload - Payload to be sent along with the action.
|
|
109
|
-
* @returns {Promise<any>}
|
|
110
|
-
* @tutorial Channel.dispatch
|
|
111
|
-
*/
|
|
112
|
-
dispatch() { }
|
|
113
|
-
/**
|
|
114
|
-
*
|
|
115
|
-
* Register an action to be called
|
|
116
|
-
* @param {string} action - Name of the action to be registered for channel clients to later invoke.
|
|
117
|
-
* @param {Channel#ChannelProvider~Action} listener - Function representing the action to be taken on a client dispatch.
|
|
118
|
-
* @returns {boolean} - Boolean representing the successful registration of the action.
|
|
119
|
-
* @tutorial Channel.register
|
|
120
|
-
*/
|
|
121
|
-
register() { }
|
|
122
|
-
/**
|
|
123
|
-
*
|
|
124
|
-
* Publish an action and payload to every connected client.
|
|
125
|
-
* Synchronously returns an array of promises for each action (see dispatch).
|
|
126
|
-
* @param {string} action
|
|
127
|
-
* @param {*} payload
|
|
128
|
-
* @returns {Array<Promise<any>>}
|
|
129
|
-
* @tutorial ChannelProvider.publish
|
|
130
|
-
*/
|
|
131
|
-
publish() { }
|
|
132
|
-
/**
|
|
133
|
-
*
|
|
134
|
-
* Register a listener that is called on every new client connection.
|
|
135
|
-
* It is passed the identity of the connecting client and a payload if it was provided to {@link Channel.connect}.
|
|
136
|
-
* If you wish to reject the connection, throw an error. Be sure to synchronously provide an onConnection upon receipt of the channelProvider
|
|
137
|
-
* to ensure all potential client connections are caught by the listener.
|
|
138
|
-
* @param {Channel#ChannelProvider~ConnectionListener} listener
|
|
139
|
-
* @returns {void}
|
|
140
|
-
* @tutorial ChannelProvider.onConnection
|
|
141
|
-
*/
|
|
142
|
-
onConnection() { }
|
|
143
|
-
/**
|
|
144
|
-
*
|
|
145
|
-
* Register a listener that is called on every new client disconnection.
|
|
146
|
-
* It is passed the disconnection event of the disconnecting client.
|
|
147
|
-
* @param {InterApplicationBus.Channel~ConnectionEvent} listener
|
|
148
|
-
* @returns {void}
|
|
149
|
-
* @tutorial Channel.onDisconnection
|
|
150
|
-
*/
|
|
151
|
-
onDisconnection() { }
|
|
152
|
-
/**
|
|
153
|
-
*
|
|
154
|
-
* Register middleware that fires before the action.
|
|
155
|
-
* @param {Channel#ChannelProvider~Middleware} middleware - Function to be executed before invoking the action.
|
|
156
|
-
* @returns {void}
|
|
157
|
-
* @tutorial ChannelMiddleware.beforeAction
|
|
158
|
-
*/
|
|
159
|
-
beforeAction() { }
|
|
160
|
-
/**
|
|
161
|
-
*
|
|
162
|
-
* Register an error handler. This is called before responding on any error.
|
|
163
|
-
* @param {Channel#ChannelProvider~Middleware} middleware - Function to be executed in case of an error.
|
|
164
|
-
* @returns {void}
|
|
165
|
-
* @tutorial ChannelMiddleware.onError
|
|
166
|
-
*/
|
|
167
|
-
onError() { }
|
|
168
|
-
/**
|
|
169
|
-
*
|
|
170
|
-
* Register middleware that fires after the action. This is passed the return value of the action.
|
|
171
|
-
* @param {Channel#ChannelProvider~Middleware} middleware - Function to be executed after invoking the action.
|
|
172
|
-
* @returns {void}
|
|
173
|
-
* @tutorial ChannelMiddleware.afterAction
|
|
174
|
-
*/
|
|
175
|
-
afterAction() { }
|
|
176
|
-
/**
|
|
177
|
-
*
|
|
178
|
-
* Remove an action by action name.
|
|
179
|
-
* @param {string} action - Name of the action to be removed.
|
|
180
|
-
* @returns {void}
|
|
181
|
-
* @tutorial Channel.remove
|
|
182
|
-
*/
|
|
183
|
-
remove() { }
|
|
184
|
-
/**
|
|
185
|
-
*
|
|
186
|
-
* Sets a default action. This is used any time an action that has not been registered is invoked.
|
|
187
|
-
* Default behavior if not set is to throw an error.
|
|
188
|
-
* @param {Channel#ChannelProvider~Middleware} middleware - Function to be executed when a client invokes an action name that has not been registered.
|
|
189
|
-
* @returns {void}
|
|
190
|
-
* @tutorial ChannelMiddleware.setDefaultAction
|
|
191
|
-
*/
|
|
192
|
-
setDefaultAction() { }
|
|
193
|
-
/** Returns an array with info on every Client connected to the Provider
|
|
194
|
-
* @returns { Promise<Array<ClientInfo>> }
|
|
195
|
-
* @tutorial Channel.getAllClientInfo
|
|
196
|
-
*/
|
|
197
|
-
getAllClientInfo() { }
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Instance created to enable use of a channel as a client. Allows for communication with the
|
|
201
|
-
* {@link Channel#ChannelProvider ChannelProvider} by invoking an action on the
|
|
202
|
-
* provider via {@link Channel#ChannelClient#dispatch dispatch} and to listen for communication
|
|
203
|
-
* from the provider by registering an action via {@link Channel#ChannelClient#register register}.
|
|
204
|
-
*
|
|
205
|
-
* ##### Constructor
|
|
206
|
-
* Returned by {@link InterApplicationBus.Channel.connect Channel.connect}.
|
|
207
|
-
*
|
|
208
|
-
* ##### Synchronous Methods
|
|
209
|
-
* * {@link Channel#ChannelClient#onDisconnection onDisconnection(listener)}
|
|
210
|
-
* * {@link Channel#ChannelClient#register register(action, listener)}
|
|
211
|
-
* * {@link Channel#ChannelClient#remove remove(action)}
|
|
212
|
-
*
|
|
213
|
-
* ##### Asynchronous Methods
|
|
214
|
-
* * {@link Channel#ChannelClient#disconnect disconnect()}
|
|
215
|
-
* * {@link Channel#ChannelClient#dispatch dispatch(action, payload)}
|
|
216
|
-
*
|
|
217
|
-
* ##### Middleware
|
|
218
|
-
* Middleware functions receive the following arguments: (action, payload, senderId).
|
|
219
|
-
* The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
|
|
220
|
-
* unless it is undefined, in which case the original payload is used. Middleware can be used for side effects.
|
|
221
|
-
* * {@link Channel#ChannelClient#setDefaultAction setDefaultAction(middleware)}
|
|
222
|
-
* * {@link Channel#ChannelClient#onError onError(middleware)}
|
|
223
|
-
* * {@link Channel#ChannelClient#beforeAction beforeAction(middleware)}
|
|
224
|
-
* * {@link Channel#ChannelClient#afterAction afterAction(middleware)}
|
|
225
|
-
*
|
|
226
|
-
* @hideconstructor
|
|
227
|
-
* @memberof! Channel#
|
|
228
|
-
* @property {InterApplicationBus.Channel~ProviderIdentity} providerIdentity a read-only provider identity
|
|
229
|
-
*/
|
|
230
|
-
class ChannelClient {
|
|
231
|
-
/**
|
|
232
|
-
*
|
|
233
|
-
* Disconnect from the channel.
|
|
234
|
-
* @tutorial Channel.disconnect
|
|
235
|
-
* @returns {Promise<void>}
|
|
236
|
-
*/
|
|
237
|
-
disconnect() { }
|
|
238
|
-
/**
|
|
239
|
-
*
|
|
240
|
-
* Dispatch the given action to the channel provider. Returns a promise that resolves with the response from the provider for that action.
|
|
241
|
-
* @param {string} action - Name of the action to be invoked by the channel provider.
|
|
242
|
-
* @param {*} payload - Payload to be sent along with the action.
|
|
243
|
-
* @tutorial Channel.dispatch
|
|
244
|
-
* @returns {Promise<any>}
|
|
245
|
-
*/
|
|
246
|
-
dispatch() { }
|
|
247
|
-
/**
|
|
248
|
-
*
|
|
249
|
-
* Register an action to be called by the provider of the channel.
|
|
250
|
-
* @param {string} action - Name of the action to be registered for the channel provider to later invoke.
|
|
251
|
-
* @param {Channel#ChannelClient~Action} listener - Function representing the action to be taken on a provider dispatch.
|
|
252
|
-
* @returns {boolean}
|
|
253
|
-
* @tutorial Channel.register
|
|
254
|
-
*/
|
|
255
|
-
register() { }
|
|
256
|
-
/**
|
|
257
|
-
*
|
|
258
|
-
* Register middleware that fires before the action.
|
|
259
|
-
* @param {Channel#ChannelClient~Middleware} middleware - Function to be executed before invoking the action.
|
|
260
|
-
* @returns {void}
|
|
261
|
-
* @tutorial ChannelMiddleware.beforeAction
|
|
262
|
-
*/
|
|
263
|
-
beforeAction() { }
|
|
264
|
-
/**
|
|
265
|
-
*
|
|
266
|
-
* Register a listener that is called on channel disconnection.
|
|
267
|
-
* It is passed the disconnection event of the disconnecting channel.
|
|
268
|
-
* @param {InterApplicationBus.Channel~ConnectionEvent} listener
|
|
269
|
-
* @returns {void}
|
|
270
|
-
* @tutorial Channel.onDisconnection
|
|
271
|
-
*/
|
|
272
|
-
onDisconnection() { }
|
|
273
|
-
/**
|
|
274
|
-
* Register an error handler. This is called before responding on any error.
|
|
275
|
-
* @param {Channel#ChannelClient~Middleware} middleware - Function to be executed in case of an error.
|
|
276
|
-
* @returns {void}
|
|
277
|
-
* @tutorial ChannelMiddleware.onError
|
|
278
|
-
*/
|
|
279
|
-
onError() { }
|
|
280
|
-
/**
|
|
281
|
-
*
|
|
282
|
-
* Register middleware that fires after the action. This is passed the return value of the action.
|
|
283
|
-
* @param {Channel#ChannelClient~Middleware} middleware - Function to be executed after invoking the action.
|
|
284
|
-
* @returns {void}
|
|
285
|
-
* @tutorial ChannelMiddleware.afterAction
|
|
286
|
-
*/
|
|
287
|
-
afterAction() { }
|
|
288
|
-
/**
|
|
289
|
-
*
|
|
290
|
-
* Remove an action by action name.
|
|
291
|
-
* @param {string} action - Name of the action to be removed.
|
|
292
|
-
* @returns {void}
|
|
293
|
-
* @tutorial Channel.remove
|
|
294
|
-
*/
|
|
295
|
-
remove() { }
|
|
296
|
-
/**
|
|
297
|
-
*
|
|
298
|
-
* Sets a default action. This is used any time an action that has not been registered is invoked.
|
|
299
|
-
* Default behavior if not set is to throw an error.
|
|
300
|
-
* @param {Channel#ChannelClient~Middleware} middleware - Function to be executed when a client invokes an action name that has not been registered.
|
|
301
|
-
* @returns {void}
|
|
302
|
-
* @tutorial ChannelMiddleware.setDefaultAction
|
|
303
|
-
*/
|
|
304
|
-
setDefaultAction() { }
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* Channel action callback signature
|
|
308
|
-
* @callback Channel#ChannelProvider~Action
|
|
309
|
-
* @param {any} payload - Payload sent along with the message.
|
|
310
|
-
* @param {InterApplicationBus.Channel~ClientIdentity} identity - Identity of the sender.
|
|
311
|
-
*/
|
|
312
|
-
/**
|
|
313
|
-
* Channel action callback signature
|
|
314
|
-
* @callback Channel#ChannelClient~Action
|
|
315
|
-
* @param {any} payload - Payload sent along with the message.
|
|
316
|
-
* @param {Identity} identity - Identity of the sender.
|
|
317
|
-
*/
|
|
318
|
-
/**
|
|
319
|
-
* Middleware function signature
|
|
320
|
-
* @callback Channel#ChannelProvider~Middleware
|
|
321
|
-
* @param {string} action - Action to be invoked.
|
|
322
|
-
* @param {any} payload - Payload sent along with the message (or error for error middleware).
|
|
323
|
-
* @param {Identity} identity - Identity of the sender.
|
|
324
|
-
*/
|
|
325
|
-
/**
|
|
326
|
-
* Middleware function signature
|
|
327
|
-
* @callback Channel#ChannelClient~Middleware
|
|
328
|
-
* @param {string} action - Action to be invoked.
|
|
329
|
-
* @param {any} payload - Payload sent along with the message (or error for error middleware).
|
|
330
|
-
* @param {Identity} identity - Identity of the sender.
|
|
331
|
-
*/
|
|
332
|
-
/**
|
|
333
|
-
* Callback for the channel onConnection or onDisconnection. If it errors connection will be rejected.
|
|
334
|
-
* @callback Channel#ChannelProvider~ConnectionListener
|
|
335
|
-
* @param {InterApplicationBus.Channel~ClientIdentity} identity - Identity of the client attempting to connect to the channel.
|
|
336
|
-
* @param {any} payload - Payload sent with connection request.
|
|
337
|
-
*/
|
|
338
|
-
/**
|
|
339
|
-
* @REMOVED
|
|
340
|
-
* Callback for onChannelConnect or onChannelDisconnect.
|
|
341
|
-
* @typedef {object} InterApplicationBus.Channel~ConnectionEvent
|
|
342
|
-
* @property {string} channelId - Identifier of the channel.
|
|
343
|
-
* @property {string} uuid - Channel provider uuid.
|
|
344
|
-
* @property {string} [name] - Channel provider name.
|
|
345
|
-
* @property {string} channelName - Name of the channel.
|
|
346
|
-
*/
|
|
347
|
-
/**
|
|
348
|
-
* @PORTED
|
|
349
|
-
* Protocol values for determining channel messaging strategy.
|
|
350
|
-
* @typedef {('classic' | 'rtc')} InterApplicationBus.Channel~MessagingProtocols - EXPERIMENTAL
|
|
351
|
-
*
|
|
352
|
-
*/
|
|
353
|
-
/**
|
|
354
|
-
* @PORTED
|
|
355
|
-
* Channel provider creation options.
|
|
356
|
-
* @typedef {object} InterApplicationBus.Channel~ChannelCreateOptions
|
|
357
|
-
* @property {InterApplicationBus.Channel~MessagingProtocols[]} [protocols=['classic']] - EXPERIMENTAL: Messaging protocols supported by the channel provider.
|
|
358
|
-
*
|
|
359
|
-
*/
|
|
360
|
-
/**
|
|
361
|
-
* @PORTED
|
|
362
|
-
* Options provided on a client connection to a channel.
|
|
363
|
-
* @typedef {object} InterApplicationBus.Channel~ChannelConnectOptions
|
|
364
|
-
* @property {InterApplicationBus.Channel~MessagingProtocols[]} [protocols=['classic']] - EXPERIMENTAL: Messaging protocols requested by the client, connection will fail if the provider protocols are not compatible.
|
|
365
|
-
* @property {any} [payload] - Payload to pass to ChannelProvider onConnection action.
|
|
366
|
-
* @property {boolean} [wait=true] - If true will wait for ChannelProvider to connect. If false will fail if ChannelProvider is not found.
|
|
367
|
-
*
|
|
368
|
-
*/
|
|
369
|
-
/**
|
|
370
|
-
* @PORTED
|
|
371
|
-
* Provider Identity.
|
|
372
|
-
* @typedef {object} InterApplicationBus.Channel~ProviderIdentity
|
|
373
|
-
* @property {string} uuid - Channel provider uuid.
|
|
374
|
-
* @property {string} [name] - Channel provider name.
|
|
375
|
-
* @property {string} channelId - Identifier of the channel.
|
|
376
|
-
* @property {boolean} [isExternal] - true if it's external connection.
|
|
377
|
-
* @property {string} channelName - Name of the channel.
|
|
378
|
-
*
|
|
379
|
-
*/
|
|
380
|
-
/**
|
|
381
|
-
* @PORTED
|
|
382
|
-
* Client Identity.
|
|
383
|
-
* @typedef {object} InterApplicationBus.Channel~ClientIdentity
|
|
384
|
-
* @property {string} uuid - Channel client uuid.
|
|
385
|
-
* @property {string} name - Channel client name.
|
|
386
|
-
* @property {string} endpointId - Unique identifier for a client, because there can be multiple clients at one name/uuid entity.
|
|
387
|
-
*
|
|
388
|
-
*/
|
|
389
|
-
/**
|
|
390
|
-
* @PORTED
|
|
391
|
-
* Extended Client Information
|
|
392
|
-
* @typedef {object} InterApplicationBus.Channel~ClientInfo
|
|
393
|
-
* @property {string} uuid - Channel client uuid
|
|
394
|
-
* @property {string} name - Channel client name
|
|
395
|
-
* @property {string} endpointId - Unique identifier for a client, because there can be multiple clients at one name/uuid entity.
|
|
396
|
-
* @property {string} entityType - Indicates if the client belongs to a Window or View
|
|
397
|
-
* @property {string} connectionUrl - URL of the View or Window at the time of connection to the Channel Provider.
|
|
398
|
-
*/
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type * as OpenFin from '../../../OpenFin';
|
|
2
|
-
import { ChannelBase } from './channel';
|
|
3
|
-
import { Transport } from '../../../transport/transport';
|
|
4
|
-
import { AnyStrategy } from './protocols/strategy-types';
|
|
5
|
-
type ProviderIdentity = OpenFin.ProviderIdentity;
|
|
6
|
-
type DisconnectionListener = (providerIdentity: ProviderIdentity) => any;
|
|
7
|
-
export type RoutingInfo = ProviderIdentity & {
|
|
8
|
-
endpointId: string;
|
|
9
|
-
};
|
|
10
|
-
export default class ChannelClient extends ChannelBase {
|
|
11
|
-
#private;
|
|
12
|
-
private disconnectListener;
|
|
13
|
-
private endpointId;
|
|
14
|
-
static closeChannelByEndpointId(id: string): void;
|
|
15
|
-
static handleProviderDisconnect(eventPayload: ProviderIdentity): void;
|
|
16
|
-
constructor(routingInfo: RoutingInfo, wire: Transport, strategy: AnyStrategy);
|
|
17
|
-
protected processAction: (action: string, payload: any, senderIdentity: ProviderIdentity | OpenFin.ClientIdentity) => Promise<any>;
|
|
18
|
-
get providerIdentity(): ProviderIdentity;
|
|
19
|
-
dispatch(action: string, payload?: any): Promise<any>;
|
|
20
|
-
onDisconnection(listener: DisconnectionListener): void;
|
|
21
|
-
disconnect(): Promise<void>;
|
|
22
|
-
sendDisconnectAction(): Promise<void>;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
-
};
|
|
13
|
-
var _ChannelClient_protectedObj, _ChannelClient_strategy, _ChannelClient_close;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const channel_1 = require("./channel");
|
|
16
|
-
const channelClientsByEndpointId = new Map();
|
|
17
|
-
class ChannelClient extends channel_1.ChannelBase {
|
|
18
|
-
static closeChannelByEndpointId(id) {
|
|
19
|
-
const channel = channelClientsByEndpointId.get(id);
|
|
20
|
-
if (channel) {
|
|
21
|
-
__classPrivateFieldGet(channel, _ChannelClient_close, "f").call(channel);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
// closes the corresponding channel and invokes the disconnect listener if an event payload is passed.
|
|
25
|
-
static handleProviderDisconnect(eventPayload) {
|
|
26
|
-
for (const channelClient of channelClientsByEndpointId.values()) {
|
|
27
|
-
if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
|
|
28
|
-
channelClient.disconnectListener(eventPayload);
|
|
29
|
-
__classPrivateFieldGet(channelClient, _ChannelClient_close, "f").call(channelClient);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
constructor(routingInfo, wire, strategy) {
|
|
34
|
-
super();
|
|
35
|
-
_ChannelClient_protectedObj.set(this, void 0);
|
|
36
|
-
_ChannelClient_strategy.set(this, void 0);
|
|
37
|
-
// needs to be bound;
|
|
38
|
-
this.processAction = (action, payload, senderIdentity) => super.processAction(action, payload, senderIdentity);
|
|
39
|
-
_ChannelClient_close.set(this, () => {
|
|
40
|
-
channelClientsByEndpointId.delete(this.endpointId);
|
|
41
|
-
__classPrivateFieldGet(this, _ChannelClient_strategy, "f").close();
|
|
42
|
-
});
|
|
43
|
-
__classPrivateFieldSet(this, _ChannelClient_protectedObj, new channel_1.ProtectedItems(routingInfo, wire), "f");
|
|
44
|
-
this.disconnectListener = () => undefined;
|
|
45
|
-
this.endpointId = routingInfo.endpointId;
|
|
46
|
-
__classPrivateFieldSet(this, _ChannelClient_strategy, strategy, "f");
|
|
47
|
-
channelClientsByEndpointId.set(this.endpointId, this);
|
|
48
|
-
strategy.receive(this.processAction);
|
|
49
|
-
}
|
|
50
|
-
get providerIdentity() {
|
|
51
|
-
const protectedObj = __classPrivateFieldGet(this, _ChannelClient_protectedObj, "f");
|
|
52
|
-
return protectedObj.providerIdentity;
|
|
53
|
-
}
|
|
54
|
-
async dispatch(action, payload) {
|
|
55
|
-
if (__classPrivateFieldGet(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
|
|
56
|
-
return __classPrivateFieldGet(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload);
|
|
57
|
-
}
|
|
58
|
-
throw new Error('The client you are trying to dispatch from is disconnected from the target provider.');
|
|
59
|
-
}
|
|
60
|
-
onDisconnection(listener) {
|
|
61
|
-
this.disconnectListener = (payload) => {
|
|
62
|
-
try {
|
|
63
|
-
listener(payload);
|
|
64
|
-
}
|
|
65
|
-
catch (err) {
|
|
66
|
-
throw new Error(`Error while calling the onDisconnection callback: ${err.message}`);
|
|
67
|
-
}
|
|
68
|
-
finally {
|
|
69
|
-
this.disconnectListener = () => undefined;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
async disconnect() {
|
|
74
|
-
await this.sendDisconnectAction();
|
|
75
|
-
__classPrivateFieldGet(this, _ChannelClient_close, "f").call(this);
|
|
76
|
-
}
|
|
77
|
-
async sendDisconnectAction() {
|
|
78
|
-
const protectedObj = __classPrivateFieldGet(this, _ChannelClient_protectedObj, "f");
|
|
79
|
-
const { channelName, uuid, name } = protectedObj.providerIdentity;
|
|
80
|
-
await protectedObj.wire.sendAction('disconnect-from-channel', {
|
|
81
|
-
channelName,
|
|
82
|
-
uuid,
|
|
83
|
-
name,
|
|
84
|
-
endpointId: this.endpointId
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
exports.default = ChannelClient;
|
|
89
|
-
_ChannelClient_protectedObj = new WeakMap(), _ChannelClient_strategy = new WeakMap(), _ChannelClient_close = new WeakMap();
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type * as OpenFin from '../../../OpenFin';
|
|
2
|
-
import { ChannelMessage } from '.';
|
|
3
|
-
import { Transport } from '../../../transport/transport';
|
|
4
|
-
import { Base } from '../../base';
|
|
5
|
-
import { ClientOffer, LocalSupportedProtocol } from './protocols/index';
|
|
6
|
-
import { RTCPacket } from './protocols/rtc/endpoint';
|
|
7
|
-
import { ChannelProvider } from './provider';
|
|
8
|
-
import { AnyStrategy } from './protocols/strategy-types';
|
|
9
|
-
export type ProviderEntry = {
|
|
10
|
-
provider: ChannelProvider;
|
|
11
|
-
strategy: AnyStrategy;
|
|
12
|
-
supportedProtocols: LocalSupportedProtocol[];
|
|
13
|
-
};
|
|
14
|
-
export declare class ConnectionManager extends Base {
|
|
15
|
-
#private;
|
|
16
|
-
private protocolManager;
|
|
17
|
-
private providerMap;
|
|
18
|
-
private static getProtocolOptionsFromStrings;
|
|
19
|
-
constructor(wire: Transport);
|
|
20
|
-
createProvider(options: OpenFin.ChannelCreateOptions | undefined, providerIdentity: any): ChannelProvider;
|
|
21
|
-
createClientOffer(options?: OpenFin.ChannelConnectOptions): Promise<{
|
|
22
|
-
offer: ClientOffer;
|
|
23
|
-
rtc?: RTCPacket;
|
|
24
|
-
}>;
|
|
25
|
-
createClientStrategy(rtcPacket: RTCPacket | undefined, routingInfo: any): Promise<AnyStrategy>;
|
|
26
|
-
removeChannelFromProviderMap: (channelId: string) => void;
|
|
27
|
-
onmessage: (msg: ChannelMessage) => boolean;
|
|
28
|
-
private processChannelConnection;
|
|
29
|
-
}
|