com.highdeal.pnr.hci
Class StatelessContextSerializationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.highdeal.pnr.hci.StatelessContextSerializationException
All Implemented Interfaces:
java.io.Serializable

public class StatelessContextSerializationException
extends java.lang.Exception

Exception thrown by the StatelessContextSerializer when errors occur. Errors are explained by error codes.

See Also:
StatelessContextSerializer, Serialized Form

Field Summary
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 Summary
StatelessContextSerializationException(int reason, java.lang.String message)
          Creates a new StatelessContextSerializationException.
StatelessContextSerializationException(int reason, java.lang.String message, java.lang.Throwable cause)
          Creates a new StatelessContextSerializationException.
 
Method Summary
 java.lang.String getMessage()
          Gets the message.
 int getReason()
          Gets the exception reason.
 void setMessage(java.lang.String message)
          Sets the message.
 void setReason(int reason)
          Sets the exception reason.
 java.lang.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).
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INCOMPATIBLE_SERIALIZER_VERSION

public static final 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).

See Also:
Constant Field Values

WRITE_ERROR

public static final 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).

See Also:
Constant Field Values

READ_ERROR

public static final 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).

See Also:
Constant Field Values

CORRUPTED_DATA

public static final 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.

See Also:
Constant Field Values

INVALID_DATA

public static final int INVALID_DATA
Reason indicating that the given byte array for unserialization has an invalid format that obstructs to read it properly.

See Also:
Constant Field Values
Constructor Detail

StatelessContextSerializationException

public StatelessContextSerializationException(int reason,
                                              java.lang.String message)
Creates a new StatelessContextSerializationException.

Parameters:
reason - The exception reason
message - An additional message

StatelessContextSerializationException

public StatelessContextSerializationException(int reason,
                                              java.lang.String message,
                                              java.lang.Throwable cause)
Creates a new StatelessContextSerializationException.

Parameters:
reason - The exception reason
message - An additional message
cause - The cause of this exception
Method Detail

setReason

public void setReason(int reason)
Sets the exception reason.

Parameters:
reason - The reason of the exception

getReason

public int getReason()
Gets the exception reason.

Returns:
The reason of the exception

setMessage

public void setMessage(java.lang.String message)
Sets the message.

Parameters:
message - The message

getMessage

public java.lang.String getMessage()
Gets the message.

Overrides:
getMessage in class java.lang.Throwable
Returns:
The message

toString

public java.lang.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).

Overrides:
toString in class java.lang.Throwable
Returns:
The short string representation of this exception

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)