Closed Roaders closed 3 months ago
Through the API fdc3.addEventListener
returns a Listener
object (as do addContextListener
and addIntentListener
). However, in the protocol we've given each listener its own message exchange for unsubscribe - but omitted one for the new event listeners.
I can go add a eventListenerUnsubscribeRequest
and eventListenerUnsubscribeResponse
- although a small voice is telling me we should perhaps be using a single exchange for all of these as they are all the same (payload is based on the listenerUUID
).
@robmoffat @Roaders, any thoughts on that? Have a single message exchange for all instances of Listener.unsubscribe
?
From an implementation point of view it's probably going to be easier to have a separate message for each type of listener. Either that or have one message type but with a string union indicating what type of listener is being removed.
I think that I would prefer being able to tell which type of listener that I am removing rather than just relying on a listener ID and potentially needing an extra lookup to figure out what type it is.
Not too bothered though, either would be fine.
This should do the job in that case: https://github.com/finos/FDC3/commit/f9fddc159404ca130f5335b9acc46290af92b370
If we want to unify these messages in future, I'm sure we could...
Question Area
Question
My
DesktopAgentProxy
is listening forChannelChangedEvent
. This event listener was setup usingAddEventListenerRequest
andAddEventListenerResponse
messages. There doesn't seem to be any way to remove this event listener though. I would have expected there to beRemoveEventListenerRequest
andRemoveEventListenerResponse