com.lightstreamer.ls_proxy
Class RequestException

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

public class RequestException
extends java.lang.Exception

Notifies an error that prevents a subscription or unsubscription request from being accomplished. The error refers to only one of the Items involved in the request and does not affect operations on the other Items.

See Also:
Serialized Form

Field Summary
static int EXTENSION_NOT_ALLOWED
          Indicates an attempt to share subscription requests on the Item when the new schema extends the current one and the Item is not a MERGE Item.
static int FIELD_NOT_FOUND
          Indicates an incorrect unsubscribe request, in which some of the supplied fields are not currently subscribed for the supplied listener.
static int ITEM_NOT_FOUND
          Indicates an incorrect unsubscribe request, in which the supplied Item is not currently subscribed.
static int LISTENER_NOT_FOUND
          Indicates an incorrect unsubscribe request, in which the supplied listener is not currently subscribed.
static int REENTRANCE
          Indicates a reentrant subscription or unsubscription request on the Item.
static int REQUIRED_FIELD_MISSING
          Indicates an incorrect subscribe or unsubscribe request, by which a required field is no longer subscribed.
static int SCHEMA_ERROR
          Indicates an incorrect unsubscribe request, in which the supplied schema doesn't match with the currently subscribed Fields for the supplied listener.
 
Constructor Summary
RequestException(int errorCode)
          Used by Lightstreamer to create a RequestException.
RequestException(int errorCode, java.lang.String extraMsg)
          Used by Lightstreamer to create a RequestException.
 
Method Summary
 int getErrorCode()
          Gets the error code for the error condition.
 
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

REENTRANCE

public static final int REENTRANCE
Indicates a reentrant subscription or unsubscription request on the Item.

See Also:
Constant Field Values

EXTENSION_NOT_ALLOWED

public static final int EXTENSION_NOT_ALLOWED
Indicates an attempt to share subscription requests on the Item when the new schema extends the current one and the Item is not a MERGE Item.

See Also:
Constant Field Values

FIELD_NOT_FOUND

public static final int FIELD_NOT_FOUND
Indicates an incorrect unsubscribe request, in which some of the supplied fields are not currently subscribed for the supplied listener. An incorrect unsubscribe request of this kind may also not be detected but give rise to this error condition upon a subsequent correct unsubscribe request. There is no recovery to this error. If it occurs, the subscription status for the Item is left unspecified. So, it is important that the consistency of unsubscribe requests is checked by the client.

See Also:
Constant Field Values

LISTENER_NOT_FOUND

public static final int LISTENER_NOT_FOUND
Indicates an incorrect unsubscribe request, in which the supplied listener is not currently subscribed. When this condition occurs, nothing has changed about the Item subscription status. If no Item is subscribed twice with the same listener, duplicate unsubscribe calls or unsubscribe calls preceded by a clearConnection call will always get this error condition; so placing redundant unsubscribe calls would be a safe practice in this case.

See Also:
Constant Field Values

SCHEMA_ERROR

public static final int SCHEMA_ERROR
Indicates an incorrect unsubscribe request, in which the supplied schema doesn't match with the currently subscribed Fields for the supplied listener. When this condition occurs, nothing has changed about the Item subscription status and the unsubscription request has been refused.

See Also:
Constant Field Values

ITEM_NOT_FOUND

public static final int ITEM_NOT_FOUND
Indicates an incorrect unsubscribe request, in which the supplied Item is not currently subscribed.

See Also:
Constant Field Values

REQUIRED_FIELD_MISSING

public static final int REQUIRED_FIELD_MISSING
Indicates an incorrect subscribe or unsubscribe request, by which a required field is no longer subscribed.

See Also:
Constant Field Values
Constructor Detail

RequestException

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

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

RequestException

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

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

getErrorCode

public int getErrorCode()
Gets the error code for the error condition.

Returns:
an integer error code, to be checked against the constants defined in the class.