Interface
caplin.services

ConnectionService

Provides information about the status of a connection to a streaming server.

Constructor Summary

Attributes Name and Description
caplin.services.ConnectionService()

Field Summary

Attributes Name and Description
<static> caplin.services.ConnectionService.STATUS_DOWN

A constant indicating that this connection is down.

<static> caplin.services.ConnectionService.STATUS_ERROR

A constant indicating that there is a problem with this connection.

<static> caplin.services.ConnectionService.STATUS_OK

A constant indicating that all sources of data are up and this connection is ok.

<static> caplin.services.ConnectionService.STATUS_PARTIAL

A constant indicating that not all sources of data are up and this connection is not completely ok.

Method Summary

Attributes Name and Description
void addStatusChangedListener(function fCallback)

Adds a listener that will have its callback method invoked when the status of the connection is updated.

void removeStatusChangedListener(function fCallback)

Removes the previously registered StateChangedListener.

Constructor Detail

caplin.services.ConnectionService()

Field Detail

<static> caplin.services.ConnectionService.STATUS_DOWN

A constant indicating that this connection is down.

<static> caplin.services.ConnectionService.STATUS_ERROR

A constant indicating that there is a problem with this connection. Example issues are login failures or session ejections.

<static> caplin.services.ConnectionService.STATUS_OK

A constant indicating that all sources of data are up and this connection is ok.

<static> caplin.services.ConnectionService.STATUS_PARTIAL

A constant indicating that not all sources of data are up and this connection is not completely ok. Some data may be missing or stale.

Method Detail

void addStatusChangedListener(function fCallback)

Adds a listener that will have its callback method invoked when the status of the connection is updated.

Parameters
function fCallback Function that is executed when the status changes. The following parameters are passed to the function: sStatus Indicates the current status of the connection ("UP", "PARTIAL", "DOWN", "ERROR"). pReasons A list of reason messages for the current status.
See
#removeStatusChangedListener

void removeStatusChangedListener(function fCallback)

Removes the previously registered StateChangedListener.

Parameters
function fCallback The callback function to remove.
See
#addStatusChangedListener