Package | com.lightstreamer.as_client.events |
Class | public class ServerErrorEvent |
Inheritance | ServerErrorEvent LSClientEvent flash.events.Event |
Dispatched whenever the Server returns an error in response to a stream/poll connection. As a consequence, the connection status will be switched to DISCONNECTED and no automatic reconnection attempt will be performed.
By handling the event, it is possible to perform recovery actions, such as trying a reconnection. Note that in case the connection status is changed in the handler, no further switch to DISCONNECTED status will be performed.
A security error while trying to access resources on the Server is also notified through this event. This error may be due to an incorrect configuration of the "/crossdomain.xml" resource on the Server. For this special case, identified by an error code of 100, error code and message are not originated by the Server.
See also
Property | Defined By | ||
---|---|---|---|
client : LSClient [read-only]
The LSClient which this event is related to. | LSClientEvent | ||
errorCode : int [read-only]
The error code returned by the Server.
A positive error code is issued by the Server after checking the
request against the constraints imposed by the Metadata Adapter or by its
own configuration. | ServerErrorEvent | ||
errorMessage : String [read-only]
The error message describing the error, returned by the Server. | ServerErrorEvent |
Constant | Defined By | ||
---|---|---|---|
SERVER_ERROR : String = ServerError [static]
Define the value of the type property of a ControlError event object. | ServerErrorEvent |
errorCode | property |
errorCode:int
[read-only]
The error code returned by the Server.
A positive error code is issued by the Server after checking the request against the constraints imposed by the Metadata Adapter or by its own configuration. See the text protocol documentation for a reference of the error codes that can be issued in response to stream/poll requests.
A zero or negative error code is issued directly by the Metadata Adapter, because of capability restrictions that may apply to the specific user.
public function get errorCode():int
errorMessage | property |
errorMessage:String
[read-only] The error message describing the error, returned by the Server.
public function get errorMessage():String
SERVER_ERROR | Constant |
public static const SERVER_ERROR:String = ServerError
Define the value of the type property of a ControlError event object.