public final class ErrorReason extends 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.
Callback.onError(com.pushtechnology.diffusion.client.callbacks.ErrorReason),
ServerHandler.onError(com.pushtechnology.diffusion.client.callbacks.ErrorReason)| 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 |
CLUSTER_REPARTITION
A cluster operation failed because partition ownership changed during
processing.
|
static ErrorReason |
CLUSTER_ROUTING
A cluster operation failed to be routed to a server within the cluster
due to a communication failure, or the server that owns a partition is
not currently known.
|
static ErrorReason |
COMMUNICATION_FAILURE
Communication with the server failed.
|
static ErrorReason |
HANDLER_CONFLICT
A conflicting registration exists.
|
static ErrorReason |
INCOMPATIBLE_DATATYPE
A datatype operation has failed due to incompatibility.
|
static ErrorReason |
INCOMPATIBLE_STATE
A topic update could not be performed because the topic is managed by a
component (for example, fan-out) which prohibits external updates.
|
static ErrorReason |
INVALID_DATA
An operation failed because invalid data was received.
|
static ErrorReason |
INVALID_PATH
An invalid path was supplied.
|
static ErrorReason |
NO_SUCH_SESSION
The session does not exist on the server.
|
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 registration exists on the same branch of the topic tree.
|
static ErrorReason |
UNHANDLED_MESSAGE
A message was not handled by the server.
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getDescription()
Description of the error reason, may be context-specific.
|
int |
getReasonCode()
A code that uniquely identifies this reason.
|
int |
hashCode() |
String |
toString() |
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 INVALID_DATA
public static final ErrorReason NO_SUCH_SESSION
public static final ErrorReason INCOMPATIBLE_DATATYPE
public static final ErrorReason UNHANDLED_MESSAGE
public static final ErrorReason CLUSTER_REPARTITION
This is a transient error that occurs while the cluster is recovering from failure. The session can retry the operation.
CLUSTER_ROUTINGpublic static final ErrorReason INCOMPATIBLE_STATE
public static final ErrorReason CLUSTER_ROUTING
This is a transient error that occurs while the cluster is recovering from failure. The session can retry the operation.
CLUSTER_REPARTITIONpublic static final ErrorReason TOPIC_TREE_REGISTRATION_CONFLICT
public static final ErrorReason HANDLER_CONFLICT
public static final ErrorReason INVALID_PATH
public ErrorReason(int reasonCode,
String description)
Application code should prefer 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 DiffusionData have reason codes in the range 0 to 65535 inclusive.
public String getDescription()
Copyright © 2025 DiffusionData Limited. All rights reserved.