T - data type parameterpublic static class ResponseObject.ErrorObject<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
CODE_INTERNAL_ERROR |
static long |
CODE_INVALID_PARAMS |
static long |
CODE_INVALID_REQUEST |
static long |
CODE_METHOD_NOT_FOUND |
static long |
CODE_PARSE_ERROR |
static long |
MAX_RESERVED_CODE_FOR_IMPLEMENTATION_DEFINED_SERVER_ERRORS
The maximum value for codes reserved for implementation-defined server errors.
|
static long |
MAX_RESERVED_CODE_FOR_PREDEFINED_ERRORS
The maximum value for codes reserved for pre-defined errors.
|
static long |
MIN_RESERVED_CODE_FOR_IMPLEMENTATION_DEFINED_SERVER_ERRORS
The minimum value for codes reserved for implementation-defined server errors.
|
static long |
MIN_RESERVED_CODE_FOR_PREDEFINED_ERRORS
The minimum value for codes reserved for pre-defined errors.
|
| Constructor and Description |
|---|
ErrorObject() |
| Modifier and Type | Method and Description |
|---|---|
long |
getCode()
Returns the current value of
code attribute. |
T |
getData()
Returns the current value of
data attribute. |
String |
getMessage()
Returns the current value of
message attribute. |
boolean |
isCodeReservedForImplementationDefinedServerErrors()
Checks the current value of
code attribute is for implementation-defined server errors. |
boolean |
isCodeReservedForPredefinedErrors()
Checks the current value of
code attribute is for pre-defined errors. |
void |
setCode(long code)
Replaces the current value of
code attribute with given. |
void |
setData(T data)
Replaces the current value of
data attribute with given. |
void |
setMessage(String message)
Replaces the current value of
message attribute with given. |
String |
toString()
Returns a string representation of the object.
|
public static final long MIN_RESERVED_CODE_FOR_PREDEFINED_ERRORS
public static final long MAX_RESERVED_CODE_FOR_PREDEFINED_ERRORS
public static final long CODE_PARSE_ERROR
public static final long CODE_INVALID_REQUEST
public static final long CODE_METHOD_NOT_FOUND
public static final long CODE_INVALID_PARAMS
public static final long CODE_INTERNAL_ERROR
public static final long MIN_RESERVED_CODE_FOR_IMPLEMENTATION_DEFINED_SERVER_ERRORS
public static final long MAX_RESERVED_CODE_FOR_IMPLEMENTATION_DEFINED_SERVER_ERRORS
public String toString()
public long getCode()
code attribute.code attribute.public void setCode(long code)
code attribute with given.code - new value for code attributepublic boolean isCodeReservedForPredefinedErrors()
code attribute is for pre-defined errors. This method checks whether the
current value of code attribute is between -32768L and
-32000L (both inclusive) or not.true if the current value of code attribute is for pre-defined errors.public boolean isCodeReservedForImplementationDefinedServerErrors()
code attribute is for implementation-defined server errors. This method
checks whether the current value of code attribute is between -32099L and -32000L
(both inclusive) or not.true if the current value of code attribute is for implementation-defined server
errors.public String getMessage()
message attribute.message attributepublic void setMessage(String message)
message attribute with given.message - new value for message attributepublic T getData()
data attribute.data attributepublic void setData(T data)
data attribute with given.data - new value for data attributeCopyright © 2019 Jinahya, Inc.. All rights reserved.