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 |
sendNow(byte[] message) |
void |
updatePolicyWithHeartbeat(String heartbeat,
boolean client) |
void |
validate(ClientPolicy policy)
Validates policy when it is set.
|
addEventListener, closeChannel, connect, disconnect, emitOnMessageReceived, getClientId, getConnectionId, 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 void sendNow(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 ReactorClientreason - why we want to build network response.public void updatePolicyWithHeartbeat(String heartbeat, boolean client)
protected void sendHeartbeat()
ReactorClientsendHeartbeat in class ReactorClientpublic void validate(ClientPolicy policy)
ReactorClientvalidate in class ReactorClientpublic String getRequestQueue()
public String getResponseQueue()
public String getEventQueue()
Copyright © 2016. All Rights Reserved.