com.lightstreamer.ls_client
Class PushServerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.lightstreamer.ls_client.PushServerException
All Implemented Interfaces:
java.io.Serializable

public class PushServerException
extends java.lang.Exception

Thrown in case of an unexpected answer or error condition received from Lightstreamer Server. A detailed error code is supplied, to support automatic recovery actions. It can be received both in a synchronous and an asynchronous way. In normal operation, this exception should never be received.

See Also:
Serialized Form

Field Summary
static int FIELDS_ERROR
          Indicates that an update has been received with an unexpected number of field values.
static int ITEMS_ERROR
          Indicates that an update has been received with an unexpected item number.
static int MAXFREQ_ERROR
          Indicates that a request to change subscription constraints has been refused because a maximum frequency was specified for an unfiltered subscription.
static int MESSAGE_ERROR
          Indicates that a message outcome has been received with an unexpected message sequence/number.
static int NO_ANSWER
          Indicates an empty output from the Server.
static int PROTOCOL_ERROR
          Indicates a Server answer not consistent with the requests.
static int RECONNECTION_TIMEOUT
          Indicates that an attempt to reconnect to a session has not received any answer for longer than a configurable timeout time.
static int SERVER_REFUSAL
          Indicates that a request has been unexpectedly refused by the Server.
static int SERVER_TIMEOUT
          Indicates that the Server has not sent data updates or probes on the connection for longer than a configurable timeout time.
static int SYNC_ERROR
          Indicates that the connection content length has been consumed but the binding to the same session with a new connection has failed.
static int SYNTAX_ERROR
          Indicates an illegal output from the Server.
static int TABLE_ERROR
          Indicates that an update has been received with an unexpected table number.
static int UNEXPECTED_END
          Indicates that the Server connection ended in the handshaking phase.
static int UNEXPECTED_ERROR
          Indicates an unexpected exception in the client.
 
Constructor Summary
PushServerException(int errorCode)
          Used by Lightstreamer to create a PushServerException.
PushServerException(int errorCode, java.lang.String extraMsg)
          Used by Lightstreamer to create a PushServerException.
PushServerException(int errorCode, java.lang.Throwable cause)
          Used by Lightstreamer to create a PushServerException.
 
Method Summary
 int getErrorCode()
          Returns the detailed error code, to support automatic recovery actions.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TABLE_ERROR

public static final int TABLE_ERROR
Indicates that an update has been received with an unexpected table number.

See Also:
Constant Field Values

ITEMS_ERROR

public static final int ITEMS_ERROR
Indicates that an update has been received with an unexpected item number.

See Also:
Constant Field Values

FIELDS_ERROR

public static final int FIELDS_ERROR
Indicates that an update has been received with an unexpected number of field values.

See Also:
Constant Field Values

UNEXPECTED_END

public static final int UNEXPECTED_END
Indicates that the Server connection ended in the handshaking phase.

See Also:
Constant Field Values

SYNTAX_ERROR

public static final int SYNTAX_ERROR
Indicates an illegal output from the Server.

See Also:
Constant Field Values

NO_ANSWER

public static final int NO_ANSWER
Indicates an empty output from the Server.

See Also:
Constant Field Values

PROTOCOL_ERROR

public static final int PROTOCOL_ERROR
Indicates a Server answer not consistent with the requests.

See Also:
Constant Field Values

SYNC_ERROR

public static final int SYNC_ERROR
Indicates that the connection content length has been consumed but the binding to the same session with a new connection has failed.

See Also:
Constant Field Values

SERVER_REFUSAL

public static final int SERVER_REFUSAL
Indicates that a request has been unexpectedly refused by the Server.

See Also:
Constant Field Values

SERVER_TIMEOUT

public static final int SERVER_TIMEOUT
Indicates that the Server has not sent data updates or probes on the connection for longer than a configurable timeout time.

See Also:
Constant Field Values

RECONNECTION_TIMEOUT

public static final int RECONNECTION_TIMEOUT
Indicates that an attempt to reconnect to a session has not received any answer for longer than a configurable timeout time.

See Also:
Constant Field Values

UNEXPECTED_ERROR

public static final int UNEXPECTED_ERROR
Indicates an unexpected exception in the client.

See Also:
Constant Field Values

MESSAGE_ERROR

public static final int MESSAGE_ERROR
Indicates that a message outcome has been received with an unexpected message sequence/number.

See Also:
Constant Field Values

MAXFREQ_ERROR

public static final int MAXFREQ_ERROR
Indicates that a request to change subscription constraints has been refused because a maximum frequency was specified for an unfiltered subscription.

See Also:
Constant Field Values
Constructor Detail

PushServerException

public PushServerException(int errorCode,
                           java.lang.String extraMsg)
Used by Lightstreamer to create a PushServerException.

Parameters:
errorCode - an integer code to be chosen from the constants defined in the class.
extraMsg - a detailed information for the error.

PushServerException

public PushServerException(int errorCode)
Used by Lightstreamer to create a PushServerException.

Parameters:
errorCode - an integer code to be chosen from the constants defined in the class.

PushServerException

public PushServerException(int errorCode,
                           java.lang.Throwable cause)
Used by Lightstreamer to create a PushServerException.

Parameters:
errorCode - an integer code to be chosen from the constants defined in the class.
cause - an unexpected exception occurred while during the elaboration of the updates.
Method Detail

getErrorCode

public int getErrorCode()
Returns the detailed error code, to support automatic recovery actions.

Returns:
Integer code from the constants defined in the class.