Packagecom.lightstreamer.as_client.events
Classpublic class StatusChangeEvent
InheritanceStatusChangeEvent Inheritance LSClientEvent Inheritance flash.events.Event

Dispatched whenever the connection status changes. A status change may be originated either by a custom action (e.g. by calling "openConnection") or by an internal action.

The normal cases are the following:

Possible special cases are the following: Note the following caveats:

By setting a custom handler it is possible to perform actions related to connection and disconnection occurrences. Such actions can be issued directly inside a handler (e.g. to prevent an automatic reconnection attempt).

See also

com.lightstreamer.as_client.LSClient.DISCONNECTED
com.lightstreamer.as_client.LSClient.CONNECTING
com.lightstreamer.as_client.LSClient.STREAMING
com.lightstreamer.as_client.LSClient.STALLED
com.lightstreamer.as_client.LSClient.POLLING
com.lightstreamer.as_client.LSClient.openConnection()
com.lightstreamer.as_client.LSClient.openPollingConnection()
com.lightstreamer.as_client.LSClient.closeConnection()
com.lightstreamer.as_client.events.ServerErrorEvent
com.lightstreamer.as_client.events.ConnectionDropEvent
com.lightstreamer.as_client.ConnectionPolicy.timeoutForStalled
com.lightstreamer.as_client.ConnectionPolicy.timeoutForReconnect
com.lightstreamer.as_client.ConnectionPolicy.bufferedStreamingHandled


Public Properties
 PropertyDefined By
 Inheritedclient : LSClient
[read-only] The LSClient which this event is related to.
LSClientEvent
  previousStatus : String
[read-only] The previous status of the connection.
StatusChangeEvent
  sessionId : String
[read-only] The id of the current session.
StatusChangeEvent
  sessionServerAddress : String
[read-only] The hostname to be used to issue all requests related to the current session.
StatusChangeEvent
  sessionServerName : String
[read-only] The instance name of the Server which is serving the current session.
StatusChangeEvent
  status : String
[read-only] The actual status of the connection.
StatusChangeEvent
Public Constants
 ConstantDefined By
  STATUS_CHANGE : String = statusChange
[static] Define the value of the type property of a StatusChange event object.
StatusChangeEvent
Property Detail
previousStatusproperty
previousStatus:String  [read-only]

The previous status of the connection.


Implementation
    public function get previousStatus():String
sessionIdproperty 
sessionId:String  [read-only]

The id of the current session. This property has a valid value only if the status value is STREAMING, POLLING or STALLED, otherwise it is null.


Implementation
    public function get sessionId():String
sessionServerAddressproperty 
sessionServerAddress:String  [read-only]

The hostname to be used to issue all requests related to the current session. In fact, when a Server cluster is in place, the Server hostname specified through the Connection instance can identify various Server instances; in order to ensure that all requests related to a session are issued to the same Server instance, the Server can answer to the session opening request by providing a hostname which uniquely identifies its own instance. When this is the case, this property is valued as such hostname; otherwise, null is returned.

This property has a valid value only if the status value is STREAMING, POLLING or STALLED, otherwise it is null.


Implementation
    public function get sessionServerAddress():String
sessionServerNameproperty 
sessionServerName:String  [read-only]

The instance name of the Server which is serving the current session. To be more precise, each answering port configured on a Server instance (through a <http_server> or <https_server> element in the Server configuration file) can be given a different name; the name related to the port to which the session opening request has been issued is returned.

Note that in case of polling or in case rebind requests are needed, subsequent requests related to the same session may be issued to a port different than the one used for the first request; the names configured for those ports would not be reported. This, however, can only happen when a Server cluster is in place and particular configurations for the load balancer are used.

This property has a valid value only if the status value is STREAMING, POLLING or STALLED, otherwise it is null.


Implementation
    public function get sessionServerName():String
statusproperty 
status:String  [read-only]

The actual status of the connection.


Implementation
    public function get status():String
Constant Detail
STATUS_CHANGEConstant
public static const STATUS_CHANGE:String = statusChange

Define the value of the type property of a StatusChange event object.