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. Theinit(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
Constructors Constructor Description WsInfoRequestHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
handledRequests()
Lists the JSON-RPC 2.0 request method names that this handler processes.void
init(WsInfo wsInfo)
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 Detail
-
WsInfoRequestHandler
public WsInfoRequestHandler()
-
-
Method Detail
-
init
public void init(WsInfo wsInfo)
Initialises this WS info request handler.- Parameters:
wsInfo
- The web service name and version to report. Must not benull
.
-
handledRequests
public String[] 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.
-
-