Attributes | Name and Description |
---|---|
|
caplin.component.comms.InterComponentComms()
This constructor is private and must never be invoked. |
Attributes | Name and Description |
---|---|
|
void
addComponentChannelListener(caplin.component.Component oComponent, caplin.component.comms.CommsChannelListener oListener)
Allows a listener to register for communication channel identifier events for a given caplin.component.Component. |
|
void
clear()
Clears all channels and listeners from the component communications hub. |
|
void
clearAllChannels()
Clears all channels, informing any listeners that the channel has been removed. |
|
void
clearAllListeners()
Removes all the listeners from the component communications hub. |
|
String
getComponentChannel(caplin.component.Component oComponent)
Returns the component channel of the given component |
|
boolean
isValidChannel(String sChannelId)
Helper method that can be used to validate a channelId before attempting to subscribe or unsubscribe from that channel. |
|
void
linkComponents(Array pComponents)
Links the given components by assigning a unique id to them |
|
void
removeComponentChannelListener(caplin.component.Component oComponent, caplin.component.comms.CommsChannelListener oCommsChannelListener)
Removes the channel listener for the given component |
►
caplin.component.comms.InterComponentComms()
This constructor is private and must never be invoked.
►
void
addComponentChannelListener(caplin.component.Component oComponent, caplin.component.comms.CommsChannelListener oListener)
Allows a listener to register for communication channel identifier events for a given caplin.component.Component. A channel identifier is used to group components together to allow them to communicate with each other.
caplin.component.Component | oComponent | the component that the listener wishes to receive communication channel events for. |
caplin.component.comms.CommsChannelListener | oListener | The communication channel listener |
►
void
clear()
Clears all channels and listeners from the component communications hub.
►
void
clearAllChannels()
Clears all channels, informing any listeners that the channel has been removed.
►
void
clearAllListeners()
Removes all the listeners from the component communications hub.
►
String
getComponentChannel(caplin.component.Component oComponent)
Returns the component channel of the given component
caplin.component.Component | oComponent |
►
boolean
isValidChannel(String sChannelId)
Helper method that can be used to validate a channelId before attempting to subscribe or unsubscribe from that channel.
String | sChannelId |
►
void
linkComponents(Array pComponents)
Links the given components by assigning a unique id to them
Array | pComponents | An array of caplin.component.Components that should be assigned the same communication channel. If listeners have already registered for communication channel events for the given components then the component channel will be updated for that component and each listener informed of the change. |
►
void
removeComponentChannelListener(caplin.component.Component oComponent, caplin.component.comms.CommsChannelListener oCommsChannelListener)
Removes the channel listener for the given component
caplin.component.Component | oComponent | The component that the listener belongs to |
caplin.component.comms.CommsChannelListener | oCommsChannelListener | the listener to remove |