public class WebsocketClient extends AbstractClient
| Constructor and Description |
|---|
WebsocketClient()
Initialize a new Websocket Client.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnection()
Use this method to close the connection of this client.
|
protected CountDownLatch |
getResponseCountDownLatch()
Get the
CountDownLatch used by this instance to change its
counter. |
protected javax.websocket.Session |
getSession()
Get the current
Session. |
JsonRPCResponse |
invokeAndReadResponse(JsonRPCRequest requestObject,
URI endpointUri,
boolean sslVerificationDisabled)
Use this method to send a
requestObject to the
endpointUri and to receive an answer. |
protected void |
setSession(javax.websocket.Session session)
Update the
Session this instance should use. |
public JsonRPCResponse invokeAndReadResponse(JsonRPCRequest requestObject, URI endpointUri, boolean sslVerificationDisabled) throws BeowulfCommunicationException, BeowulfResponseException
AbstractClientrequestObject to the
endpointUri and to receive an answer.invokeAndReadResponse in class AbstractClientrequestObject - The object to send.endpointUri - The endpoint to connect and send to.sslVerificationDisabled - Define if the SSL verification should be disabled.JsonRPCResponse object.BeowulfCommunicationException - In case of communication problems.BeowulfResponseException - If the answer received from the node is no valid JSON.public void closeConnection()
throws IOException
AbstractClientcloseConnection in class AbstractClientIOException - If the connection can't be closed.protected CountDownLatch getResponseCountDownLatch()
CountDownLatch used by this instance to change its
counter.CountDownLatch used by this instance.protected javax.websocket.Session getSession()
Session.protected void setSession(javax.websocket.Session session)
Session this instance should use.session - The session to set.Copyright © 2019. All rights reserved.