public class StatelessContextSerializationException extends Exception
StatelessContextSerializer
when errors occur. Errors are explained by error codes.StatelessContextSerializer,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static int |
CORRUPTED_DATA
Reason indicating that the given byte array for unserialization is corrupted,
either it cannot be uncompressed using ZLIB, or the data part of
the byte array (eventually after uncompressing) does not match the checksum.
|
static int |
INCOMPATIBLE_SERIALIZER_VERSION
Reason indicating that the byte array to unserialize has a bad version number
(for example, a version greater or incompatible with the version
of the used
StatelessContextSerializer). |
static int |
INVALID_DATA
Reason indicating that the given byte array for unserialization has an
invalid format that obstructs to read it properly.
|
static int |
READ_ERROR
Reason indicating that the
StatelessContextSerializer is unable to read
the given byte array as a context (details are be add in the message
and/or the nested cause exception). |
static int |
WRITE_ERROR
Reason indicating that the
StatelessContextSerializer is unable to write
the given object in a byte array (details are in the message
and/or the nested cause exception). |
| Constructor and Description |
|---|
StatelessContextSerializationException(int reason,
String message)
Creates a new StatelessContextSerializationException.
|
StatelessContextSerializationException(int reason,
String message,
Throwable cause)
Creates a new StatelessContextSerializationException.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getMessage()
Gets the message.
|
int |
getReason()
Gets the exception reason.
|
void |
setMessage(String message)
Sets the message.
|
void |
setReason(int reason)
Sets the exception reason.
|
String |
toString()
Returns a string representation of this exception; The description includes
the exception reason (ex.: INCOMPATIBLE_SERIALIZER_VERSION), the message, and the identified cause (The cause is the exception that caused this exception to get thrown).
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic static final int INCOMPATIBLE_SERIALIZER_VERSION
StatelessContextSerializer).public static final int WRITE_ERROR
StatelessContextSerializer is unable to write
the given object in a byte array (details are in the message
and/or the nested cause exception).public static final int READ_ERROR
StatelessContextSerializer is unable to read
the given byte array as a context (details are be add in the message
and/or the nested cause exception).public static final int CORRUPTED_DATA
public static final int INVALID_DATA
public StatelessContextSerializationException(int reason,
String message)
reason - The exception reasonmessage - An additional messagepublic void setReason(int reason)
reason - The reason of the exceptionpublic int getReason()
public void setMessage(String message)
message - The messagepublic String getMessage()
getMessage in class Throwablepublic String toString()