Caplin Trader 5.1.0

Interface: module:ct-services/ConnectionServiceListener

module:ct-services/ConnectionServiceListener

Listens to connection information provided by the ConnectionService.

Methods

onConnectionAvailable(liberatorUrl)

Will be called when the connection is ready and all the services are up.

Parameters:
Name Type Description
liberatorUrl string

Liberator url which provides the connection.

onConnectionInfo(message)

Will be called when any message which doesn't affect the connection state arrives.

Parameters:
Name Type Description
message sring

onConnectionLimited(reasons)

Will be called when not all sources of data are up and this connection is not completely ok. Some data may be missing or stale.

Parameters:
Name Type Description
reasons Array.<string>

A list of reasons of why this connection is limited.

onConnectionUnavailable(liberatorUrl, reasonopt)

Will be called when the connection is down.

Parameters:
Name Type Attributes Description
liberatorUrl string

Liberator url from which the connection has been lost (could be empty if no connection has been stablished at any point).

reason string <optional>

reason why the connection has become unavailable, e.g. "LOGINFAILED".