public abstract class SSLClient extends StompCommonClient
ReactorClient
implementation to provide encrypted communication.ReactorClient.MessageListener
Modifier and Type | Field and Description |
---|---|
protected SSLEngineNioHelper |
nioEngine |
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 |
---|
SSLClient(Reactor reactor,
Selector selector,
String hostname,
int port,
SSLContext sslctx) |
SSLClient(Reactor reactor,
Selector selector,
String hostname,
int port,
SSLContext sslctx,
SocketChannel socketChannel) |
Modifier and Type | Method and Description |
---|---|
protected SSLEngine |
createSSLEngine(boolean clientMode) |
List<Certificate> |
getPeerCertificates() |
protected void |
postConnect(OneTimeCallback callback)
Transport specific post connection functionality.
|
void |
postDisconnect()
Cleans resources after disconnect.
|
void |
process() |
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, getPostConnectCallback, getRetryPolicy, getSelectionKey, isInInit, isOpen, performAction, processOutgoing, removeEventListener, scheduleTask, sendMessage, setClientPolicy, updateLastIncomingHeartbeat, updateLastOutgoingHeartbeat
protected final Selector selector
protected SSLEngineNioHelper nioEngine
public SSLClient(Reactor reactor, Selector selector, String hostname, int port, SSLContext sslctx) throws ClientConnectionException
ClientConnectionException
public SSLClient(Reactor reactor, Selector selector, String hostname, int port, SSLContext sslctx, SocketChannel socketChannel) throws ClientConnectionException
ClientConnectionException
protected SSLEngine createSSLEngine(boolean clientMode)
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.public void process() throws IOException, ClientConnectionException
process
in class ReactorClient
IOException
ClientConnectionException
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
public List<Certificate> getPeerCertificates()
getPeerCertificates
in class ReactorClient
Copyright © 2016. All rights reserved.