public abstract class StompCommonClient extends ReactorClient
ReactorClient.MessageListener| Modifier and Type | Field and Description |
|---|---|
protected CountDownLatch |
connected |
static String |
DEFAULT_REQUEST_QUEUE |
static String |
DEFAULT_RESPONSE_QUEUE |
protected ByteBuffer |
headerBuffer |
protected Message |
message |
protected CountDownLatch |
subscribed |
protected List<String> |
subscriptionIds |
BUFFER_SIZE, channel, CLIENT_CLOSED, eventListeners, ibuff, key, outbox, policy, reactor| Constructor and Description |
|---|
StompCommonClient(Reactor reactor,
String hostname,
int port) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
buildNetworkResponse(String reason)
Builds network issue message for specific protocol.
|
Future<Void> |
close() |
protected void |
emitOnMessageReceived(Message message) |
String |
getEventQueue() |
String |
getRequestQueue() |
String |
getResponseQueue() |
protected void |
processIncoming()
Process incoming channel.
|
void |
send(byte[] message) |
protected void |
sendHeartbeat()
Client sends protocol specific heartbeat message
|
void |
updatePolicyWithHeartbeat(String heartbeat,
boolean client) |
void |
validate()
Validates policy when it is set.
|
addEventListener, connect, disconnect, emitOnMessageReceived, getClientId, getHostname, getPeerCertificates, getPostConnectCallback, getRetryPolicy, getSelectionKey, isInInit, isOpen, performAction, postConnect, postDisconnect, process, processOutgoing, read, removeEventListener, scheduleTask, sendMessage, setClientPolicy, updateInterestedOps, updateLastIncomingHeartbeat, updateLastOutgoingHeartbeatpublic static final String DEFAULT_REQUEST_QUEUE
public static final String DEFAULT_RESPONSE_QUEUE
protected ByteBuffer headerBuffer
protected Message message
protected CountDownLatch connected
protected CountDownLatch subscribed
public void send(byte[] message)
public Future<Void> close()
close in class ReactorClientprotected void processIncoming()
throws IOException,
ClientConnectionException
ReactorClientprocessIncoming in class ReactorClientIOException - Thrown when reading issue occurred.ClientConnectionException - Thrown when issues with connection.protected void emitOnMessageReceived(Message message)
protected byte[] buildNetworkResponse(String reason)
ReactorClientbuildNetworkResponse in class ReactorClientpublic void updatePolicyWithHeartbeat(String heartbeat, boolean client)
protected void sendHeartbeat()
ReactorClientsendHeartbeat in class ReactorClientpublic void validate()
ReactorClientvalidate in class ReactorClientpublic String getRequestQueue()
public String getResponseQueue()
public String getEventQueue()
Copyright © 2015. All Rights Reserved.