public class SSLSocketConnection extends SocketConnection
closed, daemon, daemonContext, key, protocolEngine, selectorThread, socketChannel, socketDataIn, socketDataOut
Constructor and Description |
---|
SSLSocketConnection(SSLContext context)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isConnected()
Is the socket still connected? During the initial handshake check the raw
socket status, otherwise check the protocol status.
|
boolean |
processReadEvent()
This method is called when new network data arrives on the socket.
|
boolean |
processWriteEvent()
Write any application data to the socket by wrapping it up into the
SSL protocol.
|
void |
registrationCompleted(SelectableChannel channel,
SelectionKey key,
SelectorThread selectorThread)
This method is called once the socket is registered with a SelectorThread.
|
closeConnection, getDaemonContext, getIdleStates, getInterestedOps, getLocalAddress, getLocalPort, getPort, getProtocolEngine, getRemoteAddress, getSocketChannel, getThread, initialize, isSelectorThread, setProtocolEngine, setSelectionKey, setThread, setWriteState
public SSLSocketConnection(SSLContext context)
public void registrationCompleted(SelectableChannel channel, SelectionKey key, SelectorThread selectorThread)
registrationCompleted
in interface SelectorRegistrationListener
registrationCompleted
in class SocketConnection
channel
- SelectableChannelkey
- SelectionKeyselectorThread
- SelectorThreadpublic boolean isConnected()
isConnected
in class SocketConnection
public boolean processReadEvent()
processReadEvent
in interface SocketHandler
processReadEvent
in class SocketConnection
applicationData
- ByteBufferpublic boolean processWriteEvent()
processWriteEvent
in interface SocketHandler
processWriteEvent
in class SocketConnection
applicationData
- ByteBufferCopyright © 2016. All rights reserved.