cz.eman.jsonrpc.shared
Class MessageFactory

java.lang.Object
  extended by cz.eman.jsonrpc.shared.MessageFactory

public class MessageFactory
extends java.lang.Object

Factory that creates Message objects (wrappers of json-rpc messages).

Author:
Karel Hovorka

Field Summary
static java.lang.String VERSION
           
 
Constructor Summary
MessageFactory()
           
 
Method Summary
static JsonRpcErrorResponse getMessageErrorResult(JsonRpcRequest query, java.lang.Throwable t)
           
static JsonRpcNormalResponse getMessageNormalResult(JsonRpcRequest query, java.lang.Object result)
           
static JsonRpcRequest getMessageQuery(java.lang.String input)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values
Constructor Detail

MessageFactory

public MessageFactory()
Method Detail

getMessageQuery

public static JsonRpcRequest getMessageQuery(java.lang.String input)
                                      throws org.codehaus.jackson.JsonParseException,
                                             org.codehaus.jackson.map.JsonMappingException,
                                             java.io.IOException
Throws:
org.codehaus.jackson.JsonParseException
org.codehaus.jackson.map.JsonMappingException
java.io.IOException

main

public static void main(java.lang.String[] args)

getMessageErrorResult

public static JsonRpcErrorResponse getMessageErrorResult(JsonRpcRequest query,
                                                         java.lang.Throwable t)
                                                  throws org.codehaus.jackson.JsonParseException,
                                                         org.codehaus.jackson.map.JsonMappingException,
                                                         java.io.IOException
Throws:
org.codehaus.jackson.JsonParseException
org.codehaus.jackson.map.JsonMappingException
java.io.IOException

getMessageNormalResult

public static JsonRpcNormalResponse getMessageNormalResult(JsonRpcRequest query,
                                                           java.lang.Object result)
                                                    throws org.codehaus.jackson.JsonParseException,
                                                           org.codehaus.jackson.map.JsonMappingException,
                                                           java.io.IOException
Throws:
org.codehaus.jackson.JsonParseException
org.codehaus.jackson.map.JsonMappingException
java.io.IOException