Caplin Trader 4.0.3

Interface: module:caplin/component/comms/CommsChannelListener

module:caplin/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.
Implementations:
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:caplin/component/Component The component that the channel subscription to be set for.
    sChannelId String The Id of the channel
    Implementations:
    • module:caplin/component/comms/OpenAjaxChannelSubscriptionHelper#onChannelRemoved

    onChannelSet(oComponent, sChannelId)

    Called when the channel for the given component is set.
    Parameters:
    Name Type Description
    oComponent module:caplin/component/Component The component that the channel subscription to be set for.
    sChannelId String The Id of the channel
    Implementations:
    • module:caplin/component/comms/OpenAjaxChannelSubscriptionHelper#onChannelSet