Class ResponseObject.ErrorObject<DataType>
- java.lang.Object
-
- com.github.jinahya.jsonrpc.bind.v2.ResponseObject.ErrorObject<DataType>
-
- Type Parameters:
DataType- "data" type parameter
- Enclosing class:
- ResponseObject<ResultType,ErrorType extends ResponseObject.ErrorObject<?>,IdType>
public static class ResponseObject.ErrorObject<DataType> extends Object
A class for binding "error" property of response objects.
-
-
Field Summary
Fields Modifier and Type Field Description static intCODE_INTERNAL_ERRORThe code value for internal error meaning an internal JSON-RPC error.static intCODE_INVALID_PARAMSThe code value for invalid params meaning invalid parameter(s).static intCODE_INVALID_REQUESTThe code value for invalid request meaning the JSON sent is not a valid request object.static intCODE_METHOD_NOT_FOUNDThe code value for method not found meaning the method does not exist nor available.static intCODE_PARSE_ERRORThe code value for parse error meaning an invalid json received by the server or an error occurred on the server while parsing the JSON text.static intMAX_CODE_IMPLEMENTATION_DEFINED_SERVER_ERRORThe maximum value for codes reserved for implementation-defined server errors.static intMAX_CODE_PREDEFINED_ERRORThe maximum value for codes reserved for pre-defined errors.static intMIN_CODE_IMPLEMENTATION_DEFINED_SERVER_ERRORThe minimum value for codes reserved for implementation-defined server errors.static intMIN_CODE_PREDEFINED_ERRORThe minimum value for codes reserved for pre-defined errors.static StringPROPERTY_NAME_CODEThe property name for$.error.codeof response objects.static StringPROPERTY_NAME_DATAThe property name for$.error.dataof response objects.static StringPROPERTY_NAME_MESSAGEThe property name for$.error.messageof response objects.
-
Constructor Summary
Constructors Constructor Description ErrorObject()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Indicates whether some other object is "equal to" this one.IntegergetCode()Returns the current value of "code" property.DataTypegetData()Returns the current value of "data" property.StringgetMessage()Returns the current value of "message" property.inthashCode()Returns a hash code value for the object.voidsetCode(Integer code)Replaces the current value of "code" property with specified value.voidsetData(DataType data)Replaces the current value of "data" property with specified value.voidsetMessage(String message)Replaces the current value of "message" property with specified value.StringtoString()Returns a string representation of the object.
-
-
-
Field Detail
-
PROPERTY_NAME_CODE
public static final String PROPERTY_NAME_CODE
The property name for$.error.codeof response objects. The value is "code".- See Also:
- Constant Field Values
-
PROPERTY_NAME_MESSAGE
public static final String PROPERTY_NAME_MESSAGE
The property name for$.error.messageof response objects. The value is "message".- See Also:
- Constant Field Values
-
PROPERTY_NAME_DATA
public static final String PROPERTY_NAME_DATA
The property name for$.error.dataof response objects. The value is "data".- See Also:
- Constant Field Values
-
MIN_CODE_PREDEFINED_ERROR
public static final int MIN_CODE_PREDEFINED_ERROR
The minimum value for codes reserved for pre-defined errors. The value is -32768.- See Also:
- Constant Field Values
-
MAX_CODE_PREDEFINED_ERROR
public static final int MAX_CODE_PREDEFINED_ERROR
The maximum value for codes reserved for pre-defined errors. The value is -32000.- See Also:
- Constant Field Values
-
CODE_PARSE_ERROR
public static final int CODE_PARSE_ERROR
The code value for parse error meaning an invalid json received by the server or an error occurred on the server while parsing the JSON text. The value is -32700.- See Also:
- Constant Field Values
-
CODE_INVALID_REQUEST
public static final int CODE_INVALID_REQUEST
The code value for invalid request meaning the JSON sent is not a valid request object. The value is -32600.- See Also:
- Constant Field Values
-
CODE_METHOD_NOT_FOUND
public static final int CODE_METHOD_NOT_FOUND
The code value for method not found meaning the method does not exist nor available. The value is -32601.- See Also:
- Constant Field Values
-
CODE_INVALID_PARAMS
public static final int CODE_INVALID_PARAMS
The code value for invalid params meaning invalid parameter(s). The value is -32602.- See Also:
- Constant Field Values
-
CODE_INTERNAL_ERROR
public static final int CODE_INTERNAL_ERROR
The code value for internal error meaning an internal JSON-RPC error. The value is -32603.- See Also:
- Constant Field Values
-
MIN_CODE_IMPLEMENTATION_DEFINED_SERVER_ERROR
public static final int MIN_CODE_IMPLEMENTATION_DEFINED_SERVER_ERROR
The minimum value for codes reserved for implementation-defined server errors. The value is -32099.- See Also:
- Constant Field Values
-
MAX_CODE_IMPLEMENTATION_DEFINED_SERVER_ERROR
public static final int MAX_CODE_IMPLEMENTATION_DEFINED_SERVER_ERROR
The maximum value for codes reserved for implementation-defined server errors. The value is -32000.- See Also:
- Constant Field Values
-
-
Method Detail
-
toString
public String toString()
Returns a string representation of the object.
-
equals
public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.
-
hashCode
public int hashCode()
Returns a hash code value for the object.
-
getCode
public Integer getCode()
Returns the current value of "code" property. Note that the value of the "code" property must beNotNullin a Bean-Validation context.- Returns:
- the current value of "code" property.
-
setCode
public void setCode(Integer code)
Replaces the current value of "code" property with specified value.- Parameters:
code- new value for "code" property.
-
getMessage
public String getMessage()
Returns the current value of "message" property.- Returns:
- the current value of "message" property.
-
setMessage
public void setMessage(String message)
Replaces the current value of "message" property with specified value.- Parameters:
message- new value for "message" property.
-
getData
public DataType getData()
Returns the current value of "data" property.- Returns:
- the current value of "data" property.
-
-