|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception com.thetransactioncompany.jsonrpc2.client.JSONRPC2SessionException
public class JSONRPC2SessionException
Thrown to indicate a JSON-RPC 2.0 client session exception. Allows a general cause type to be specified to ease diagnostics and exception reporting.
Field Summary | |
---|---|
static int |
BAD_RESPONSE
Invalid JSON-RPC 2.0 response (invalid JSON or invalid JSON-RPC 2.0 response message). |
static int |
JSONRPC2_ERROR
Received a JSON-RPC 2.0 error response. |
static int |
NETWORK_EXCEPTION
The exception cause is network or I/O related. |
static int |
UNEXPECTED_CONTENT_TYPE
Unexpected "Content-Type" header value of the HTTP response. |
static int |
UNEXPECTED_RESULT
Unexpected JSON-RPC 2.0 response result (the result doesn't match the JSON type / format expected by the client). |
static int |
UNSPECIFIED
Unspecified cause type. |
Constructor Summary | |
---|---|
JSONRPC2SessionException(String message)
Creates a new JSON-RPC 2.0 session exception with the specified message; the cause type is UNSPECIFIED . |
|
JSONRPC2SessionException(String message,
int causeType)
Creates a new JSON-RPC 2.0 session exception with the specified message and cause type. |
|
JSONRPC2SessionException(String message,
int causeType,
Throwable cause)
Creates a new JSON-RPC 2.0 session exception with the specified message, cause type and cause. |
Method Summary | |
---|---|
int |
getCauseType()
Returns the exception cause type. |
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 |
---|
public static final int UNSPECIFIED
public static final int NETWORK_EXCEPTION
public static final int UNEXPECTED_CONTENT_TYPE
public static final int BAD_RESPONSE
public static final int UNEXPECTED_RESULT
public static final int JSONRPC2_ERROR
Constructor Detail |
---|
public JSONRPC2SessionException(String message)
UNSPECIFIED
.
message
- The message.public JSONRPC2SessionException(String message, int causeType)
message
- The message.causeType
- The cause type, see the constants.public JSONRPC2SessionException(String message, int causeType, Throwable cause)
message
- The message.causeType
- The cause type, see the constants.cause
- The original exception.Method Detail |
---|
public int getCauseType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |