com.thetransactioncompany.jsonrpc2.server.examples
Class Example.EchoHandler

java.lang.Object
  extended by com.thetransactioncompany.jsonrpc2.server.examples.Example.EchoHandler
All Implemented Interfaces:
RequestHandler
Enclosing class:
Example

public static class Example.EchoHandler
extends Object
implements RequestHandler


Constructor Summary
Example.EchoHandler()
           
 
Method Summary
 String[] handledRequests()
          Gets the names of the handled JSON-RPC 2.0 request methods.
 com.thetransactioncompany.jsonrpc2.JSONRPC2Response process(com.thetransactioncompany.jsonrpc2.JSONRPC2Request req, MessageContext ctx)
          Processes a JSON-RPC 2.0 request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Example.EchoHandler

public Example.EchoHandler()
Method Detail

handledRequests

public String[] handledRequests()
Description copied from interface: RequestHandler
Gets the names of the handled JSON-RPC 2.0 request methods.

Specified by:
handledRequests in interface RequestHandler
Returns:
The names of the handled JSON-RPC 2.0 request methods.

process

public com.thetransactioncompany.jsonrpc2.JSONRPC2Response process(com.thetransactioncompany.jsonrpc2.JSONRPC2Request req,
                                                                   MessageContext ctx)
Description copied from interface: RequestHandler
Processes a JSON-RPC 2.0 request.

Specified by:
process in interface RequestHandler
Parameters:
req - A valid JSON-RPC 2.0 request instance. Must not be null.
ctx - Context information about the request message, may be null if undefined.
Returns:
The resulting JSON-RPC 2.0 response. It indicates success or an error, such as METHOD_NOT_FOUND.


Copyright © 2013 The Transaction Company. All Rights Reserved.