Class
caplin.component.comms

OpenAjaxChannelSubscriptionHelper

The class has been deprecated and may be removed in future releases.

Constructor Summary

Attributes Name and Description
caplin.component.comms.OpenAjaxChannelSubscriptionHelper(caplin.component.Component oComponent, String sNameSpace, String sEventName, Object oCallbackScope, Function fCallbackMethod)

The caplin.component.comms.OpenAjaxChannelSubscriptionHelper can be used to help manage OpenAjax subscriptions.

Method Summary

Attributes Name and Description
void finalize()

Called to clear down the object.

String getChannelId()

Gets the current channel ID.

Methods implemented from class caplin.component.comms.CommsChannelListener:
onChannelRemoved, onChannelSet

Constructor Detail

caplin.component.comms.OpenAjaxChannelSubscriptionHelper(caplin.component.Component oComponent, String sNameSpace, String sEventName, Object oCallbackScope, Function fCallbackMethod)

The caplin.component.comms.OpenAjaxChannelSubscriptionHelper can be used to help manage OpenAjax subscriptions. Subscriptions are formed of a namespace, a channel, and an event in the format "namespace.channel.event". The "channel" is generally linked to a caplin.component.Component or group of components. However, the channel associated with a component can change during runtime so managing the subscriptions to OpenAjax events can result in duplicate code being written to handle the channel being changed, unsubscribing from the previous channel, and subscribing to the new channel. The caplin.component.comms.OpenAjaxChannelSubscriptionHelper can be used to manage this for you and all you need to do is supply the component, the namespace, the event name and a callback scope (object) and callback method.

Parameters
caplin.component.Component oComponent The component that the channel subscription should be made for.
String sNameSpace The namespace of the event being subscribed to. Events have the following format "namespace.channel.event".
String sEventName The name of the event being subscribed to.
Object oCallbackScope The object that the callback will be made on. The method that will be called is identified by the fCallbackMethod parameter.
Function fCallbackMethod The method to be called on the oCallbackScope object.
Deprecated
This is deprecated now. You should use the EventHub instead of the open ajax comms.

Method Detail

void finalize()

Called to clear down the object.

String getChannelId()

Gets the current channel ID.