Caplin Trader 5.1.0

Interface: module:ct-services/ConnectionService

module:ct-services/ConnectionService

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

Members

(static) STATUS_DOWN

Deprecated:
  • A constant indicating that this connection is down.

(static) STATUS_ERROR

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

(static) STATUS_OK

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

(static) STATUS_PARTIAL

Deprecated:
  • 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.

Methods

addStatusChangedListener(ConnectionServiceListener, Tells)

Adds a ConnectionServiceListener.

Parameters:
Name Type Description
ConnectionServiceListener oListener

implementation that will be called back when a status change occurs.

Tells bNotifyImmediately

the ConnectionService if it wants a notification of the current status in the moment the listener is added.

See:

connect()

Connects to the connection service, or do nothing if already connected.

disconnect()

Disconnects from the connection service or do nothing if already disconnected.

dispose()

Disposes of any listeners and resources that were used by the service.

removeStatusChangedListener(oLitener)

Removes the previously registered ConnectionServiceListener.

Parameters:
Name Type Description
oLitener oListener

The listener to remove.

See: