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, subscriptionIds
BUFFER_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, close, emitOnMessageReceived, getEventQueue, getRequestQueue, getResponseQueue, processIncoming, send, sendHeartbeat, sendNow, updatePolicyWithHeartbeat, validate
addEventListener, closeChannel, connect, disconnect, emitOnMessageReceived, getClientId, getConnectionId, getHostname, getPeerCertificates, getPostConnectCallback, getRetryPolicy, getSelectionKey, isInInit, isOpen, performAction, process, processOutgoing, removeEventListener, scheduleTask, sendMessage, setClientPolicy, updateLastIncomingHeartbeat, updateLastOutgoingHeartbeat
protected final Selector selector
public PlainClient(Reactor reactor, Selector selector, String hostname, int port) throws ClientConnectionException
ClientConnectionException
public PlainClient(Reactor reactor, Selector selector, String hostname, int port, SocketChannel socketChannel) throws ClientConnectionException
ClientConnectionException
public void updateInterestedOps()
ReactorClient
updateInterestedOps
in class ReactorClient
protected int read(ByteBuffer buff) throws IOException
ReactorClient
read
in class ReactorClient
buff
- provided buffer to be read.IOException
- when networking issue occurs.protected void postConnect(OneTimeCallback callback) throws ClientConnectionException
ReactorClient
postConnect
in class ReactorClient
callback
- - callback which is executed after connection is estabilished.ClientConnectionException
- when issues with connection.public void postDisconnect()
ReactorClient
postDisconnect
in class ReactorClient
Copyright © 2016. All rights reserved.