Package com.nimbusds.common.jsonrpc2
Class WsDetector
java.lang.Object
com.nimbusds.common.jsonrpc2.WsDetector
- Direct Known Subclasses:
LoggingWsDetector
Detects the name and version of a remote JSON-RPC 2.0 web service, as
reported by a
WsInfoRequestHandler
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondetect()
Detects the JSON-RPC 2.0 web service name and version.com.thetransactioncompany.jsonrpc2.client.JSONRPC2Session
Gets the client session associated with this JSON-RPC 2.0 web service detected.
-
Constructor Details
-
WsDetector
Creates a new JSON-RPC 2.0 web service detector.- Parameters:
url
- The web service HTTP(S) URL. Must not benull
.
-
-
Method Details
-
getSession
Gets the client session associated with this JSON-RPC 2.0 web service detected.- Returns:
- The JSON-RPC 2.0 client session.
-
detect
Detects the JSON-RPC 2.0 web service name and version. The target web service must handlews.getName
andws.getVersion
calls, as implemented byWsInfoRequestHandler
.- Returns:
- The reported web service name and version.
- Throws:
Exception
- If the web service name and version couldn't be detected, for example due to a network exception.
-