Methods
(async) addClientToContextGroup(addClientToContextGroupOptions, clientIdentity) → {Promise.<void>}
Helper function for InteropBroker.joinContextGroup. Does the work of actually adding the client to the Context Group. Used by Platform Windows.
Parameters:
Name | Type | Description |
---|---|---|
addClientToContextGroupOptions |
AddClientToContextGroupOptions | Contains the contextGroupId |
clientIdentity |
ClientIdentity | Identity of the client sender. |
Returns:
- Type
- Promise.<void>
(async) clientDisconnected(clientIdentity) → {Promise.<void>}
Provides the identity of any Interop Client that disconnects from the Interop Broker. It is meant to be overriden.
Parameters:
Name | Type | Description |
---|---|---|
clientIdentity |
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) fdc3HandleFindInstances(app, clientIdentity)
Responsible for resolving the fdc3.findInstances call. Must be overridden
Parameters:
Name | Type | Description |
---|---|---|
app |
AppIdentifier(2) | AppIdentifier that was passed to fdc3.findInstances |
clientIdentity |
ClientIdentity | Identity of the Client making the request. |
(async) fdc3HandleGetAppMetadata(app, clientIdentity)
Responsible for resolving the fdc3.getAppMetadata call. Must be overridden
Parameters:
Name | Type | Description |
---|---|---|
app |
AppIdentifier(2) | AppIdentifier that was passed to fdc3.getAppMetadata |
clientIdentity |
ClientIdentity | Identity of the Client making the request. |
(async) fdc3HandleGetInfo(clientIdentity) → {Promise.<ImplementationMetadata(2)>}
Responsible for resolving fdc3.getInfo for FDC3 2.0 Would need to return the optionalFeatures and appMetadata for the ImplementationMetadata. Must be overridden.
Parameters:
Name | Type | Description |
---|---|---|
clientIdentity |
Returns:
- Type
- Promise.<ImplementationMetadata(2)>
(async) fdc3HandleOpen(fdc3OpenOptions, clientIdentity)
Responsible for resolving an fdc3.open call. Must be overridden.
Parameters:
Name | Type | Description |
---|---|---|
fdc3OpenOptions |
Fdc3OpenOptions | fdc3.open options |
clientIdentity |
ClientIdentity | Identity of the Client making the request. |
(async) getAllClientInfo() → {Promise.<Array.<ClientInfo>>}
Returns an array of info for each Interop Client connected to the Interop Broker.
FDC3 2.0: Use the endpointId in the ClientInfo as the instanceId when generating an AppIdentifier.
- Tutorials:
Returns:
- Type
- Promise.<Array.<ClientInfo>>
getAllClientsInContextGroup(getAllClientsInContextGroupOptions) → {Promise.<Array.<ClientIdentity>>}
Gets all clients for a context group. Used by Platform Windows.
Parameters:
Name | Type | Description |
---|---|---|
getAllClientsInContextGroupOptions |
GetAllClientsInContextGroupOptions | Contains contextGroupId, the context group you wish to get clients for. |
Returns:
- Type
- Promise.<Array.<ClientIdentity>>
getContextGroups() → {Promise.<Array.<ContextGroupInfo>>}
Returns the Interop-Broker-defined context groups available for an entity to join. Because this function is used in the rest of the Interop Broker to fetch the Context Groups, overriding this allows you to customize the Context Groups for the Interop Broker. However, we recommend customizing the context groups through configuration instead. Used by Platform Windows.
Returns:
- Type
- Promise.<Array.<ContextGroupInfo>>
getCurrentContext(getContextOptions, clientIdentity) → {Context}
Get current context for a client subscribed to a Context Group.
Parameters:
Name | Type | Description |
---|---|---|
getContextOptions |
GetContextOptions | Options for getting context |
clientIdentity |
ClientIdentity | Identity of the client sender. |
Returns:
- Type
- Context
getInfoForContextGroup(getInfoForContextGroupOptions) → {Promise.<ContextGroupInfo>}
Gets display info for a context group Used by Platform Windows.
Parameters:
Name | Type | Description |
---|---|---|
getInfoForContextGroupOptions |
GetInfoForContextGroupOptions | Contains contextGroupId, the context group you wish to get display info for. |
Returns:
- Type
- Promise.<ContextGroupInfo>
(async) handleFiredIntent(intent, clientIdentity) → {Promise.<unknown>}
Responsible for launching of applications that can handle a given intent, and delegation of intents to those applications. Must be overridden.
Parameters:
Name | Type | Description |
---|---|---|
intent |
Intent | The combination of an action and a context that is passed to an application for resolution. |
clientIdentity |
ClientIdentity | Identity of the Client making the request. |
- Tutorials:
Returns:
- Type
- Promise.<unknown>
(async) handleFiredIntentForContext(contextForIntent, clientIdentity) → {Promise.<unknown>}
Responsible for resolving an Intent based on a specific Context. Must be overridden.
Parameters:
Name | Type | Description |
---|---|---|
contextForIntent |
ContextForIntent | Data passed between entities and applications. |
clientIdentity |
ClientIdentity | Identity of the Client making the request. |
- Tutorials:
Returns:
- Type
- Promise.<unknown>
(async) handleInfoForIntent(options, clientIdentity) → {Promise.<unknown>}
Responsible for returning information on a particular Intent. Must be overridden.
Parameters:
Name | Type | Description |
---|---|---|
options |
InfoForIntentOptions | |
clientIdentity |
ClientIdentity | Identity of the Client making the request. |
- Tutorials:
Returns:
- Type
- Promise.<unknown>
(async) handleInfoForIntentsByContext(context, clientIdentity) → {Promise.<unknown>}
Responsible for returning information on which Intents are meant to handle a specific Context. Must be overridden.
Parameters:
Name | Type | Description |
---|---|---|
context |
Context | Data passed between entities and applications. |
clientIdentity |
ClientIdentity | Identity of the Client making the request. |
- Tutorials:
Returns:
- Type
- Promise.<unknown>
(async) invokeContextHandler(clientIdentity, handlerId, context) → {Promise.<void>}
This function is called by the Interop Broker whenever a Context handler would fire. For FDC3 2.0 you would need to override this function and add the contextMetadata as part of the Context object. Then would you need to call super.invokeContextHandler passing it this new Context object along with the clientIdentity and handlerId
Parameters:
Name | Type | Description |
---|---|---|
clientIdentity |
ClientIdentity | |
handlerId |
string | |
context |
Context |
- Tutorials:
-
- Tutorial: interopBroker.invokeContextHandler
Returns:
- Type
- Promise.<void>
(async) invokeIntentHandler(ClientIdentity, handlerId, context) → {Promise.<void>}
This function is called by the Interop Broker whenever an Intent handler would fire. For FDC3 2.0 you would need to override this function and add the contextMetadata as part of the Context object inside the Intent object. Then would you need to call super.invokeIntentHandler passing it this new Intent object along with the clientIdentity and handlerId
Parameters:
Name | Type | Description |
---|---|---|
ClientIdentity |
ClientIdentity | |
handlerId |
string | |
context |
Context |
- Tutorials:
-
- Tutorial: interopBroker.invokeIntentHandler
Returns:
- Type
- Promise.<void>
isActionAuthorized(_action, _payload, _identity)
Called before every action to check if this entity should be allowed to take the action. Return false to prevent the action
Parameters:
Name | Type | Description |
---|---|---|
_action |
the string action to authorize in camel case |
|
_payload |
the data being sent for this action |
|
_identity |
the connection attempting to dispatch this action |
isConnectionAuthorized(_id, _connectionPayload)
Can be used to completely prevent a connection. Return false to prevent connections. Allows all connections by default.
Parameters:
Name | Type | Description |
---|---|---|
_id |
the identity tryinc to connect |
|
_connectionPayload |
optional payload to use in custom implementations, will be undefined by default |
(async) joinContextGroup(joinContextGroupOptions, senderIdentity) → {Promise.<void>}
Join all connections at the given identity (or just one if endpointId provided) to context group contextGroupId
.
If no target is specified, it adds the sender to the context group.
joinContextGroup is responsible for checking connections at the incoming identity. It calls InteropBroker.addClientToContextGroup to actually group the client.
Used by Platform Windows.
Parameters:
Name | Type | Description |
---|---|---|
joinContextGroupOptions |
JoinContextGroupOptions | Id of the Context Group and identity of the entity to join to the group. |
senderIdentity |
ClientIdentity | Identity of the client sender. |
Returns:
- Type
- Promise.<void>
(async) removeClientFromContextGroup() → {Promise.<void>}
Helper function for InteropBroker.removeFromContextGroup. Does the work of actually removing the client from the Context Group. Used by Platform Windows.
Properties:
Name | Type | Description |
---|---|---|
clientIdentity |
ClientIdentity | Identity of the client sender. |
Returns:
- Type
- Promise.<void>
(async) removeFromContextGroup(removeFromContextGroupOptions, senderIdentity) → {Promise.<void>}
Removes the specified target from a context group. If no target is specified, it removes the sender from their context group. removeFromContextGroup is responsible for checking connections at the incoming identity. It calls InteropBroker.removeClientFromContextGroup to actually ungroup the client. Used by Platform Windows.
Parameters:
Name | Type | Description |
---|---|---|
removeFromContextGroupOptions |
RemoveFromContextGroupOptions | Contains the target identity to remove. |
senderIdentity |
ClientIdentity | Identity of the client sender. |
Returns:
- Type
- Promise.<void>
setContext(setContextOptions, clientIdentity) → {void}
Sets a context for the context group of the incoming current entity.
Parameters:
Name | Type | Description |
---|---|---|
setContextOptions |
SetContextOptions | New context to set. |
clientIdentity |
ClientIdentity | Identity of the client sender. |
Returns:
- Type
- void
(async) setIntentTarget(intent, target) → {Promise.<void>}
Should be called in InteropBroker.handleFiredIntent. While handleFiredIntent is responsible for launching applications, setIntentTarget is used to tell the InteropBroker which application should receive the intent when it is ready.
Parameters:
Name | Type | Description |
---|---|---|
intent |
Intent | The combination of an action and a context that is passed to an application for resolution. |
target |
Identity | Identity of the target that will handle the intent. |
Returns:
- Type
- Promise.<void>