PrivateChannel.onAddContextListener
Desktop Agent bridging message exchange for the addition of a ContextHandler
to a PrivateChannel
. Generated by API call:
PrivateChannel.addContextListener(contextType: string | null, handler: ContextHandler): Promise<Listener>
(inherited fromChannel
)
Message Exchange Type: Request only
Some additional tracking of PrivateChannel metadata is required on the Desktop Agent that created each PrivateChannel and on any Desktop Agent interacting with it, in order to use these message exchanges. Please see the relevant section of the Agent Bridging overview for more details.
When a ContextListener
is added to a PrivateChannel
any applications that have added an onAddContextListener
handler MUST be notified. If the listener is on the agent that created that channel, it should forward the message onto all the registered listeners. If the listener is added on a remote agent it MUST send the message to the agent that created the channel which will repeat it onto the other listeners without modifying the source information.
Message exchange
Request format
Request message schemas
- https://fdc3.finos.org/schemas/next/bridging/privateChannelOnAddContextListenerAgentRequest.schema.json
- https://fdc3.finos.org/schemas/next/bridging/privateChannelOnAddContextListenerBridgeRequest.schema.json
Example
// agent-A -> DAB
{
"type": "PrivateChannel.onAddContextListener",
"payload": {
"channelId": "private-channel-ABC123",
"contextType": "fdc3.instrument"
},
"meta": {
"requestUuid": "<requestUuid>",
"timestamp": "2020-03-...",
"source": {
"appId": "AnotherApp",
"instanceId": "02e235ba-acad-4b66-4c3a-547073be23f1",
"desktopAgent": "agent-B" //added by DAB
},
"destination": {
"appId": "AChatApp",
"instanceId": "02e575aa-4c3a-4b66-acad-155073be21f6",
"desktopAgent": "agent-A"
}
}
}