public final class ErrorReason extends Object
onError
to a client side object.
An application can check whether an ErrorReason is equal to some expected
value using Object.equals(Object)
. Equality is derived from the
reasonCode
, with instances with equal codes
considered equal.
Some common ErrorReason values are defined as constants in this class. More
specific reasons may be defined by individual
features
.
Modifier and Type | Field and Description |
---|---|
static ErrorReason |
ACCESS_DENIED
The request was rejected because the caller has insufficient permissions.
|
static ErrorReason |
CALLBACK_EXCEPTION
An application callback threw an exception.
|
static ErrorReason |
COMMUNICATION_FAILURE
Communication with the server failed.
|
static ErrorReason |
REQUEST_TIME_OUT
Communication with the server failed because a service request timed out.
|
static ErrorReason |
SESSION_CLOSED
Communication with the server failed because the session is closed.
|
static ErrorReason |
TOPIC_TREE_REGISTRATION_CONFLICT
A conflicting, pre-existing registration exists on the same branch of the
topic tree.
|
static ErrorReason |
UNSUPPORTED
The request was rejected because the requested service is unsupported for this caller.
|
Constructor and Description |
---|
ErrorReason(int reasonCode,
String description)
Constructor.
|
public static final ErrorReason COMMUNICATION_FAILURE
public static final ErrorReason SESSION_CLOSED
public static final ErrorReason REQUEST_TIME_OUT
public static final ErrorReason ACCESS_DENIED
public static final ErrorReason UNSUPPORTED
public static final ErrorReason CALLBACK_EXCEPTION
public static final ErrorReason TOPIC_TREE_REGISTRATION_CONFLICT
public ErrorReason(int reasonCode, String description)
Application code should use pre-defined constants such as
COMMUNICATION_FAILURE
, rather than calling this.
reasonCode
- a unique codedescription
- a description of the reason, may be context-specificpublic int getReasonCode()
Applications should rarely need to call this method and prefer
equals(Object)
to compare instances for equality.
Reasons defined by Push Technology have reason codes in the range 0 to 65535 inclusive.
Copyright © 2016 Push Technology Ltd. All Rights Reserved.