public class StompClient extends PlainClient
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 |
---|
StompClient(Reactor reactor,
Selector selector,
String hostname,
int port) |
Modifier and Type | Method and 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.
|
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, setClientPolicy, updateLastIncomingHeartbeat, updateLastOutgoingHeartbeat
public StompClient(Reactor reactor, Selector selector, String hostname, int port) throws ClientConnectionException
ClientConnectionException
public void sendMessage(byte[] message)
ReactorClient
sendMessage
in class ReactorClient
message
- - content of the message to sent.protected void postConnect(OneTimeCallback callback) throws ClientConnectionException
ReactorClient
postConnect
in class PlainClient
callback
- - callback which is executed after connection is estabilished.ClientConnectionException
- when issues with connection.protected OneTimeCallback getPostConnectCallback()
getPostConnectCallback
in class ReactorClient
OneTimeCallback
or null. The callback is executed
after the connection is established.public boolean isInInit()
isInInit
in class ReactorClient
true
when connection initialization is in progress like
SSL hand shake. false
when connection is initialized.Copyright © 2016. All rights reserved.