Package com.nimbusds.common.jsonrpc2
Class WsInfoRequestHandler
java.lang.Object
com.nimbusds.common.jsonrpc2.WsInfoRequestHandler
- All Implemented Interfaces:
com.thetransactioncompany.jsonrpc2.server.RequestHandler
public class WsInfoRequestHandler
extends Object
implements com.thetransactioncompany.jsonrpc2.server.RequestHandler
Handles JSON-RPC 2.0 requests for general information about a web service.
The
init(com.nimbusds.common.jsonrpc2.WsInfo)
method must be called before servicing requests.
List of the handled requests:
- ws.getName Reports the web service name (as a string).
- ws.getVersion Reports the web service version (as a string).
- ws.getTime Reports the local server time (as a string).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Lists the JSON-RPC 2.0 request method names that this handler processes.void
Initialises this WS info request handler.com.thetransactioncompany.jsonrpc2.JSONRPC2Response
process
(com.thetransactioncompany.jsonrpc2.JSONRPC2Request request, com.thetransactioncompany.jsonrpc2.server.MessageContext requestCtx) Processes JSON-RPC 2.0 requests for general information about this web service.
-
Constructor Details
-
WsInfoRequestHandler
public WsInfoRequestHandler()
-
-
Method Details
-
init
Initialises this WS info request handler.- Parameters:
wsInfo
- The web service name and version to report. Must not benull
.
-
handledRequests
Lists the JSON-RPC 2.0 request method names that this handler processes.- Specified by:
handledRequests
in interfacecom.thetransactioncompany.jsonrpc2.server.RequestHandler
- Returns:
- The method names of the served JSON-RPC 2.0 requests.
-
process
public com.thetransactioncompany.jsonrpc2.JSONRPC2Response process(com.thetransactioncompany.jsonrpc2.JSONRPC2Request request, com.thetransactioncompany.jsonrpc2.server.MessageContext requestCtx) Processes JSON-RPC 2.0 requests for general information about this web service.- Specified by:
process
in interfacecom.thetransactioncompany.jsonrpc2.server.RequestHandler
- Parameters:
request
- The JSON-RPC 2.0 request.requestCtx
- Additional information about the request.- Returns:
- The JSON-RPC 2.0 response.
-