com.almende.eve.rpc.jsonrpc
Class JSONResponse

java.lang.Object
  extended by com.almende.eve.rpc.jsonrpc.JSONResponse

public class JSONResponse
extends Object


Field Summary
protected  com.fasterxml.jackson.databind.node.ObjectNode resp
           
 
Constructor Summary
JSONResponse()
           
JSONResponse(JSONRPCException error)
           
JSONResponse(Object result)
           
JSONResponse(Object id, JSONRPCException error)
           
JSONResponse(com.fasterxml.jackson.databind.node.ObjectNode response)
           
JSONResponse(Object id, Object result)
           
JSONResponse(String json)
           
 
Method Summary
 JSONRPCException getError()
           
 Object getId()
           
 com.fasterxml.jackson.databind.node.ObjectNode getObjectNode()
           
 com.fasterxml.jackson.databind.JsonNode getResult()
           
<T> T
getResult(Class<T> type)
           
 void setError(JSONRPCException error)
           
 void setId(Object id)
           
 void setResult(Object result)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resp

protected com.fasterxml.jackson.databind.node.ObjectNode resp
Constructor Detail

JSONResponse

public JSONResponse()

JSONResponse

public JSONResponse(String json)
             throws JSONRPCException,
                    com.fasterxml.jackson.core.JsonParseException,
                    com.fasterxml.jackson.databind.JsonMappingException,
                    IOException
Throws:
JSONRPCException
com.fasterxml.jackson.core.JsonParseException
com.fasterxml.jackson.databind.JsonMappingException
IOException

JSONResponse

public JSONResponse(com.fasterxml.jackson.databind.node.ObjectNode response)
             throws JSONRPCException
Throws:
JSONRPCException

JSONResponse

public JSONResponse(Object result)

JSONResponse

public JSONResponse(Object id,
                    Object result)

JSONResponse

public JSONResponse(JSONRPCException error)

JSONResponse

public JSONResponse(Object id,
                    JSONRPCException error)
Method Detail

setId

public void setId(Object id)

getId

public Object getId()

setResult

public void setResult(Object result)

getResult

public com.fasterxml.jackson.databind.JsonNode getResult()

getResult

public <T> T getResult(Class<T> type)

setError

public void setError(JSONRPCException error)

getError

public JSONRPCException getError()
                          throws JSONRPCException
Throws:
JSONRPCException

getObjectNode

public com.fasterxml.jackson.databind.node.ObjectNode getObjectNode()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Almende BV. All Rights Reserved.