public abstract class PlainClient extends StompCommonClient
ReactorClient implementation to provide not encrypted communication.ReactorClient.MessageListener| Modifier and Type | Field and Description |
|---|---|
protected Selector |
selector |
connected, DEFAULT_REQUEST_QUEUE, DEFAULT_RESPONSE_QUEUE, headerBuffer, message, subscribed, subscriptionIdsBUFFER_SIZE, channel, CLIENT_CLOSED, eventListeners, ibuff, key, outbox, policy, reactor| Constructor and Description |
|---|
PlainClient(Reactor reactor,
Selector selector,
String hostname,
int port) |
PlainClient(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 |
postDisconnect()
Cleans resources after disconnect.
|
protected int |
read(ByteBuffer buff)
Reads provided buffer.
|
void |
updateInterestedOps()
Updates selection key's operation set.
|
buildNetworkResponse, clean, close, emitOnMessageReceived, getEventQueue, getRequestQueue, getResponseQueue, processIncoming, send, sendHeartbeat, sendNow, updatePolicyWithHeartbeat, validateaddEventListener, closeChannel, connect, disconnect, emitOnMessageReceived, getClientId, getConnectionId, getHostname, getPeerCertificates, getPostConnectCallback, getRetryPolicy, getSelectionKey, isInInit, isOpen, performAction, process, processOutgoing, removeEventListener, scheduleTask, sendMessage, setClientPolicy, updateLastIncomingHeartbeat, updateLastOutgoingHeartbeatprotected final Selector selector
public PlainClient(Reactor reactor, Selector selector, String hostname, int port) throws ClientConnectionException
ClientConnectionExceptionpublic PlainClient(Reactor reactor, Selector selector, String hostname, int port, SocketChannel socketChannel) throws ClientConnectionException
ClientConnectionExceptionpublic void updateInterestedOps()
ReactorClientupdateInterestedOps in class ReactorClientprotected int read(ByteBuffer buff) throws IOException
ReactorClientread in class ReactorClientbuff - provided buffer to be read.IOException - when networking issue occurs.protected void postConnect(OneTimeCallback callback) throws ClientConnectionException
ReactorClientpostConnect in class ReactorClientcallback - - callback which is executed after connection is estabilished.ClientConnectionException - when issues with connection.public void postDisconnect()
ReactorClientpostDisconnect in class ReactorClientCopyright © 2018. All Rights Reserved.