Runnable
public class LoggingWsDetector extends WsDetector implements Runnable
WsInfoRequestHandler
. To prevent blocking the detection
routine is run on a separate thread.
Example:
new Thread(new LoggingWsDetector(...)).start();
Constructor | Description |
---|---|
LoggingWsDetector(URL url,
String expectedWsName,
org.apache.logging.log4j.Logger log) |
Creates a new JSON-RPC 2.0 web service detector.
|
Modifier and Type | Method | Description |
---|---|---|
WsInfo |
getWsInfo() |
Returns the detected web service name and version.
|
void |
run() |
Detects and logs the JSON-RPC 2.0 web service name and version.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
detect, getSession
public LoggingWsDetector(URL url, String expectedWsName, org.apache.logging.log4j.Logger log)
url
- The web service HTTP(S) URL. Must not be
null
.expectedWsName
- The expected web service name, as reported by
ws.getName
. Must not be null
.log
- The logger. Must not be null
.public WsInfo getWsInfo()
null
if not
detected.public void run()
ws.getName
and
ws.getVersion
calls, as implemented by
WsInfoRequestHandler
.
Any encountered exceptions are logged at WARN level.
Copyright © 2018 Connect2id. All rights reserved.