Caplin Trader 5.1.0

Interface: module:ct-component/comms/CommsChannelListener

module:ct-component/comms/CommsChannelListener

Interface implemented by classes wishing to listen communication channel events such as a component being assigned a communication channel. Classes that are interested in listening to these events can subscribe to them via InterComponentComms#addComponentChannelListener and can then later be removed via InterComponentComms#removeComponentChannelListener.

Overriding any of the methods in this listener interface is optional. Doing so will enable you to react to the related event.

Deprecated:
  • This is deprecated now. You should use the EventHub instead of the open ajax comms.

Methods

onChannelRemoved(oComponent, sChannelId)

Called when the channel associated with the given component is removed.

Parameters:
Name Type Description
oComponent module:ct-component/Component

The component that the channel subscription to be set for.

sChannelId String

The Id of the channel

onChannelSet(oComponent, sChannelId)

Called when the channel for the given component is set.

Parameters:
Name Type Description
oComponent module:ct-component/Component

The component that the channel subscription to be set for.

sChannelId String

The Id of the channel