com.thetransactioncompany.jsonrpc2.server
Interface RequestHandler

All Known Implementing Classes:
Dispatcher, Example.DateTimeHandler, Example.EchoHandler

public interface RequestHandler

Interface for handling JSON-RPC 2.0 requests.

Author:
Vladimir Dzhuvinov

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 request, MessageContext requestCtx)
          Processes a JSON-RPC 2.0 request.
 

Method Detail

handledRequests

String[] handledRequests()
Gets the names of the handled JSON-RPC 2.0 request methods.

Returns:
The names of the handled JSON-RPC 2.0 request methods.

process

com.thetransactioncompany.jsonrpc2.JSONRPC2Response process(com.thetransactioncompany.jsonrpc2.JSONRPC2Request request,
                                                            MessageContext requestCtx)
Processes a JSON-RPC 2.0 request.

Parameters:
request - A valid JSON-RPC 2.0 request instance. Must not be null.
requestCtx - 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.