Class PlainClient
java.lang.Object
org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient
org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompCommonClient
org.ovirt.vdsm.jsonrpc.client.reactors.PlainClient
- Direct Known Subclasses:
StompClient
ReactorClient implementation to provide not encrypted communication.-
Nested Class Summary
Nested classes/interfaces inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient
ReactorClient.MessageListener -
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionPlainClient(Reactor reactor, Selector selector, String hostname, int port) PlainClient(Reactor reactor, Selector selector, String hostname, int port, SocketChannel socketChannel) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidpostConnect(OneTimeCallback callback) Transport specific post connection functionality.voidCleans resources after disconnect.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, getPeerCertificates, getPostConnectCallback, getRetryPolicy, getSelectionKey, isInInit, isOpen, now, performAction, process, processOutgoing, removeEventListener, scheduleTask, sendMessage, setClientPolicy, updateLastIncomingHeartbeat, updateLastOutgoingHeartbeat
-
Field Details
-
selector
-
-
Constructor Details
-
PlainClient
-
PlainClient
public PlainClient(Reactor reactor, Selector selector, String hostname, int port, SocketChannel socketChannel) throws ClientConnectionException - Throws:
ClientConnectionException
-
-
Method Details
-
updateInterestedOps
public void updateInterestedOps()Description copied from class:ReactorClientUpdates selection key's operation set.- Specified by:
updateInterestedOpsin classReactorClient
-
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.
-
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
-