org.directwebremoting.jsonrpc.io
Class JsonRpcError

java.lang.Object
  extended by org.directwebremoting.jsonrpc.io.JsonRpcError

public class JsonRpcError
extends java.lang.Object

A Container for a JSON-RPC request

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
JsonRpcError(JsonRpcCallException ex)
           
JsonRpcError(JsonRpcCalls calls, java.lang.String message, int code, java.lang.Object data)
          Create an Error from a request and an exception/error code
JsonRpcError(java.lang.String version, java.lang.String id, java.lang.String message, int code, java.lang.Object data)
           
 
Method Summary
 int getCode()
          A Number that indicates the actual error that occurred.
 java.lang.Object getData()
          Additional information, may be omitted.
 java.lang.String getId()
          A Request identifier that SHOULD be a JSON scalar (String, Number, True, False), but SHOULD normally not be Null [1].
 java.lang.String getJsonrpc()
           
 java.lang.String getMessage()
          A String providing a short description of the error.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonRpcError

public JsonRpcError(JsonRpcCalls calls,
                    java.lang.String message,
                    int code,
                    java.lang.Object data)
Create an Error from a request and an exception/error code


JsonRpcError

public JsonRpcError(java.lang.String version,
                    java.lang.String id,
                    java.lang.String message,
                    int code,
                    java.lang.Object data)
Parameters:
version -
id -
message -
code -
data -

JsonRpcError

public JsonRpcError(JsonRpcCallException ex)
Parameters:
ex -
Method Detail

getJsonrpc

public java.lang.String getJsonrpc()
Returns:
A String specifying the version of the JSON-RPC protocol.

getId

public java.lang.String getId()
A Request identifier that SHOULD be a JSON scalar (String, Number, True, False), but SHOULD normally not be Null [1]. If omitted, the Request is a Notification.


getData

public java.lang.Object getData()
Additional information, may be omitted. Its contents is entirely defined by the application (e.g. detailed error information, nested errors etc.).


getCode

public int getCode()
A Number that indicates the actual error that occurred. This MUST be an integer.


getMessage

public java.lang.String getMessage()
A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.


Copyright 2008