Class StompListener
- 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
-
- org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompClient
-
- org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompListener
-
- All Implemented Interfaces:
Sender
public class StompListener extends StompClient implements Sender
-
-
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 CommandFactory
commandFactory
-
Fields inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.PlainClient
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, PEER_CERTIFICATE_EMPTY_LIST, policy, reactor
-
-
Constructor Summary
Constructors Constructor Description StompListener(Reactor reactor, java.nio.channels.Selector selector, java.lang.String hostname, int port, java.nio.channels.SocketChannel socketChannel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
postConnect(OneTimeCallback callback)
Transport specific post connection functionality.(package private) void
processMessage(Message message)
void
sendMessage(byte[] message)
Sends message using provided byte array.void
setClientPolicy(ClientPolicy policy)
-
Methods inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompClient
getPostConnectCallback, isInInit
-
Methods inherited from class org.ovirt.vdsm.jsonrpc.client.reactors.PlainClient
postDisconnect, 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, getPeerCertificates, getRetryPolicy, getSelectionKey, isOpen, now, performAction, process, processOutgoing, removeEventListener, scheduleTask, updateLastIncomingHeartbeat, updateLastOutgoingHeartbeat
-
-
-
-
Field Detail
-
commandFactory
private CommandFactory commandFactory
-
-
Constructor Detail
-
StompListener
public StompListener(Reactor reactor, java.nio.channels.Selector selector, java.lang.String hostname, int port, java.nio.channels.SocketChannel socketChannel) throws ClientConnectionException
- Throws:
ClientConnectionException
-
-
Method Detail
-
setClientPolicy
public void setClientPolicy(ClientPolicy policy)
- Overrides:
setClientPolicy
in classReactorClient
-
sendMessage
public void sendMessage(byte[] message)
Description copied from class:ReactorClient
Sends message using provided byte array.- Overrides:
sendMessage
in classStompClient
- Parameters:
message
- - content of the message to sent.
-
processMessage
void processMessage(Message message)
-
postConnect
protected void postConnect(OneTimeCallback callback) throws ClientConnectionException
Description copied from class:ReactorClient
Transport specific post connection functionality.- Overrides:
postConnect
in classStompClient
- Parameters:
callback
- - callback which is executed after connection is estabilished.- Throws:
ClientConnectionException
- when issues with connection.
-
-