java.lang.Object
net.i2p.i2pcontrol.servlets.jsonrpc2handlers.GetRateHandler
- All Implemented Interfaces:
RequestHandler
JSON-RPC2 handler for the GetRate method. Retrieves statistical rate data from the router for the specified statistic and time period.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JSONRPC2HelperChecks the token a request carries.private static final String[]The argument names this method requires.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionString[]Method names this handler services.process(JSONRPC2Request req, MessageContext ctx) Process a GetRate request
Field Details
requiredArgs
The argument names this method requires._helper
Checks the token a request carries.
Constructor Details
GetRateHandler
Retains the shared request helper.- Parameters:
helper- the shared helper that validates the named parameters of an incoming request
Method Details
handledRequests
Method names this handler services.- Specified by:
handledRequestsin interfaceRequestHandler- Returns:
- method names handled by this handler
process
Process a GetRate 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.