public class StompListener extends StompClient implements Sender
ReactorClient.MessageListener
selector
connected, DEFAULT_REQUEST_QUEUE, DEFAULT_RESPONSE_QUEUE, headerBuffer, message, subscribed, subscriptionIds
BUFFER_SIZE, channel, CLIENT_CLOSED, eventListeners, ibuff, key, outbox, policy, reactor
Constructor and Description |
---|
StompListener(Reactor reactor,
Selector selector,
String hostname,
int port,
SocketChannel socketChannel) |
Modifier and Type | Method and Description |
---|---|
protected void |
postConnect(OneTimeCallback callback)
Transport specific post connection functionality.
|
void |
sendMessage(byte[] message)
Sends message using provided byte array.
|
void |
setClientPolicy(ClientPolicy policy) |
getPostConnectCallback, isInInit
postDisconnect, read, updateInterestedOps
buildNetworkResponse, close, emitOnMessageReceived, getEventQueue, getRequestQueue, getResponseQueue, processIncoming, send, sendHeartbeat, sendNow, updatePolicyWithHeartbeat, validate
addEventListener, closeChannel, connect, disconnect, emitOnMessageReceived, getClientId, getConnectionId, getHostname, getPeerCertificates, getRetryPolicy, getSelectionKey, isOpen, performAction, process, processOutgoing, removeEventListener, scheduleTask, updateLastIncomingHeartbeat, updateLastOutgoingHeartbeat
public StompListener(Reactor reactor, Selector selector, String hostname, int port, SocketChannel socketChannel) throws ClientConnectionException
ClientConnectionException
public void setClientPolicy(ClientPolicy policy)
setClientPolicy
in class ReactorClient
public void sendMessage(byte[] message)
ReactorClient
sendMessage
in class StompClient
message
- - content of the message to sent.protected void postConnect(OneTimeCallback callback) throws ClientConnectionException
ReactorClient
postConnect
in class StompClient
callback
- - callback which is executed after connection is estabilished.ClientConnectionException
- when issues with connection.Copyright © 2016. All rights reserved.