Class SSLClient
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
- Direct Known Subclasses:
SSLStompClient
ReactorClient implementation to provide encrypted communication.-
Nested Class Summary
Nested classes/interfaces inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient
ReactorClient.MessageListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprotected static org.slf4j.Loggerprotected SSLEngineNioHelperprotected final Selectorprivate SSLContextFields inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompCommonClient
connected, DEFAULT_REQUEST_QUEUE, DEFAULT_RESPONSE_QUEUE, headerBuffer, message, subscribed, subscriptionIdsFields inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient
BUFFER_SIZE, channel, CLIENT_CLOSED, eventListeners, half, ibuff, key, outbox, PEER_CERTIFICATE_EMPTY_LIST, policy, reactor -
Constructor Summary
ConstructorsConstructorDescriptionSSLClient(Reactor reactor, Selector selector, String hostname, int port, SSLContext sslctx) SSLClient(Reactor reactor, Selector selector, String hostname, int port, SSLContext sslctx, SocketChannel socketChannel) -
Method Summary
Modifier and TypeMethodDescriptionprotected SSLEnginecreateSSLEngine(boolean clientMode) private Runnableprotected voidpostConnect(OneTimeCallback callback) Transport specific post connection functionality.voidCleans resources after disconnect.voidprocess()protected intread(ByteBuffer buff) Reads provided buffer.voidUpdates selection key's operation set.protected voidwrite(ByteBuffer buff) Writes provided buffer.Methods inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompCommonClient
buildNetworkResponse, clean, close, emitOnMessageReceived, getEventQueue, getRequestQueue, getResponseQueue, processIncoming, send, sendHeartbeat, sendNow, updatePolicyWithHeartbeat, validateMethods inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient
addEventListener, closeChannel, connect, disconnect, emitOnMessageReceived, getClientId, getConnectionId, getHostname, getPostConnectCallback, getRetryPolicy, getSelectionKey, isInInit, isOpen, now, performAction, processOutgoing, removeEventListener, scheduleTask, sendMessage, setClientPolicy, updateLastIncomingHeartbeat, updateLastOutgoingHeartbeat
-
Field Details
-
log
protected static org.slf4j.Logger log -
selector
-
nioEngine
-
sslContext
-
client
private boolean client
-
-
Constructor Details
-
SSLClient
-
SSLClient
public SSLClient(Reactor reactor, Selector selector, String hostname, int port, SSLContext sslctx, SocketChannel socketChannel) throws ClientConnectionException - Throws:
ClientConnectionException
-
-
Method Details
-
createSSLEngine
-
updateInterestedOps
public void updateInterestedOps()Description copied from class:ReactorClientUpdates selection key's operation set.- Specified by:
updateInterestedOpsin classReactorClient
-
pendingOperations
- Throws:
IOExceptionClientConnectionException
-
read
Description copied from class:ReactorClientReads provided buffer.- Specified by:
readin classReactorClient- Parameters:
buff- provided buffer to be read.- Returns:
- Number of bytes read.
- Throws:
IOException- when networking issue occurs.
-
write
Description copied from class:ReactorClientWrites provided buffer.- Specified by:
writein classReactorClient- Parameters:
buff- provided buffer to be written.- Throws:
IOException- when networking issue occurs.
-
process
- Overrides:
processin classReactorClient- Throws:
IOExceptionClientConnectionException
-
postConnect
Description copied from class:ReactorClientTransport specific post connection functionality.- Specified by:
postConnectin classReactorClient- Parameters:
callback- - callback which is executed after connection is estabilished.- Throws:
ClientConnectionException- when issues with connection.
-
postDisconnect
public void postDisconnect()Description copied from class:ReactorClientCleans resources after disconnect.- Specified by:
postDisconnectin classReactorClient
-
getPeerCertificates
- Overrides:
getPeerCertificatesin classReactorClient- Returns:
- the peer certificates of the current session
-