Class SSLStompClient
- java.lang.Object
-
- org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient
-
- org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompCommonClient
-
- org.ovirt.vdsm.jsonrpc.client.reactors.SSLClient
-
- org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompClient
-
- Direct Known Subclasses:
SSLStompListener
public class SSLStompClient extends SSLClient
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient
ReactorClient.MessageListener
-
-
Field Summary
Fields Modifier and Type Field Description private OneTimeCallback
callback
-
Fields inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.SSLClient
log, nioEngine, selector
-
Fields inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompCommonClient
connected, DEFAULT_REQUEST_QUEUE, DEFAULT_RESPONSE_QUEUE, headerBuffer, message, subscribed, subscriptionIds
-
Fields inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient
BUFFER_SIZE, channel, CLIENT_CLOSED, eventListeners, half, ibuff, key, outbox, policy, reactor
-
-
Constructor Summary
Constructors Constructor Description SSLStompClient(Reactor reactor, java.nio.channels.Selector selector, java.lang.String hostname, int port, javax.net.ssl.SSLContext sslContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OneTimeCallback
getPostConnectCallback()
boolean
isInInit()
protected void
postConnect(OneTimeCallback callback)
Transport specific post connection functionality.void
sendMessage(byte[] message)
Sends message using provided byte array.private void
setWaitForConnect()
private void
waitForConnect()
-
Methods inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.SSLClient
createSSLEngine, getPeerCertificates, postDisconnect, process, read, updateInterestedOps, write
-
Methods inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompCommonClient
buildNetworkResponse, clean, close, emitOnMessageReceived, getEventQueue, getRequestQueue, getResponseQueue, processIncoming, send, sendHeartbeat, sendNow, updatePolicyWithHeartbeat, validate
-
Methods inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient
addEventListener, closeChannel, connect, disconnect, emitOnMessageReceived, getClientId, getConnectionId, getHostname, getRetryPolicy, getSelectionKey, isOpen, now, performAction, processOutgoing, removeEventListener, scheduleTask, setClientPolicy, updateLastIncomingHeartbeat, updateLastOutgoingHeartbeat
-
-
-
-
Field Detail
-
callback
private OneTimeCallback callback
-
-
Constructor Detail
-
SSLStompClient
public SSLStompClient(Reactor reactor, java.nio.channels.Selector selector, java.lang.String hostname, int port, javax.net.ssl.SSLContext sslContext)
-
-
Method Detail
-
sendMessage
public void sendMessage(byte[] message) throws ClientConnectionException
Description copied from class:ReactorClient
Sends message using provided byte array.- Specified by:
sendMessage
in classReactorClient
- Parameters:
message
- - content of the message to sent.- Throws:
ClientConnectionException
- when issues with connection.
-
postConnect
protected void postConnect(OneTimeCallback callback) throws ClientConnectionException
Description copied from class:ReactorClient
Transport specific post connection functionality.- Overrides:
postConnect
in classSSLClient
- Parameters:
callback
- - callback which is executed after connection is estabilished.- Throws:
ClientConnectionException
- when issues with connection.
-
getPostConnectCallback
protected OneTimeCallback getPostConnectCallback()
- Specified by:
getPostConnectCallback
in classReactorClient
- Returns:
- Client specific
OneTimeCallback
or null. The callback is executed after the connection is established.
-
setWaitForConnect
private void setWaitForConnect()
-
waitForConnect
private void waitForConnect()
-
isInInit
public boolean isInInit()
- Specified by:
isInInit
in classReactorClient
- Returns:
true
when connection initialization is in progress like SSL hand shake.false
when connection is initialized.
-
-