new module:ct-component /comms /Inter Component Comms()
This constructor is private and must never be invoked.
A singleton that allows a module:ct-component/Component
to obtain a unique communication channel
identifier.
- Deprecated:
- This is deprecated now. You should use the EventHub instead of the open ajax comms.
Methods
add Component Channel Listener(oComponent, oListener)
Allows a listener to register for communication channel identifier events for a given module:ct-component/Component
.
A channel identifier is used to group components together to allow them to communicate with each other.
Parameters:
Name | Type | Description |
---|---|---|
oComponent |
module:ct-component |
the component that the listener wishes to receive communication channel events for. |
oListener |
module:ct-component |
The communication channel listener |
clear()
Clears all channels and listeners from the component communications hub.
clear All Channels()
Clears all channels, informing any listeners that the channel has been removed.
clear All Listeners()
Removes all the listeners from the component communications hub.
get Component Channel(oComponent)
Returns the component channel of the given component
Parameters:
Name | Type | Description |
---|---|---|
oComponent |
module:ct-component |
Returns:
The channel id of the channel
is Valid Channel(sChannel Id)
Helper method that can be used to validate a channelId before attempting to subscribe or unsubscribe from that channel.
Parameters:
Name | Type | Description |
---|---|---|
sChannelId |
String |
link Components(pComponents)
Links the given components by assigning a unique id to them
Parameters:
Name | Type | Description |
---|---|---|
pComponents |
Array | An array of |
remove Component Channel Listener(oComponent, oComms Channel Listener)
Removes the channel listener for the given component
Parameters:
Name | Type | Description |
---|---|---|
oComponent |
module:ct-component |
The component that the listener belongs to |
oCommsChannelListener |
module:ct-component |
the listener to remove |