Class EchoHandler
- java.lang.Object
-
- net.i2p.i2pcontrol.servlets.jsonrpc2handlers.EchoHandler
-
- All Implemented Interfaces:
RequestHandler
public class EchoHandler extends Object implements RequestHandler
-
-
Constructor Summary
Constructors Constructor Description EchoHandler(JSONRPC2Helper helper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]handledRequests()Gets the names of the handled JSON-RPC 2.0 request methods.JSONRPC2Responseprocess(JSONRPC2Request req, MessageContext ctx)Processes a JSON-RPC 2.0 request.
-
-
-
Constructor Detail
-
EchoHandler
public EchoHandler(JSONRPC2Helper helper)
-
-
Method Detail
-
handledRequests
public String[] handledRequests()
Description copied from interface:RequestHandlerGets the names of the handled JSON-RPC 2.0 request methods.- Specified by:
handledRequestsin interfaceRequestHandler- Returns:
- The names of the handled JSON-RPC 2.0 request methods.
-
process
public JSONRPC2Response process(JSONRPC2Request req, MessageContext ctx)
Description copied from interface:RequestHandlerProcesses a JSON-RPC 2.0 request.- Specified by:
processin interfaceRequestHandler- Parameters:
req- A valid JSON-RPC 2.0 request instance. Must not benull.ctx- Context information about the request message, may benullif undefined.- Returns:
- The resulting JSON-RPC 2.0 response. It indicates success or an error, such as METHOD_NOT_FOUND.
-
-