public class SSLContextConnection extends SocketConnection
closed, daemon, daemonContext, key, protocolEngine, selectorThread, socketChannel, socketDataIn, socketDataOut| Constructor and Description |
|---|
SSLContextConnection()
Default constructor.
|
SSLContextConnection(boolean allowClientCertificate,
boolean requireClientCertificate) |
| Modifier and Type | Method and Description |
|---|---|
static javax.net.ssl.SSLContext |
getSSLContext()
Get the SSL context.
|
static void |
initializeSSL()
Initialize SSL.
|
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(java.nio.channels.SelectableChannel channel,
java.nio.channels.SelectionKey key,
SelectorThread selectorThread)
This method is called once the socket is registered with a SelectorThread.
|
boolean |
wantsWrite()
Tell the selector that the handler wants to write.
|
addTask, closeConnection, closeConnection, flagWrite, getConnection, getContext, getDaemonContext, getIdleStates, getInitialOps, getLocalAddress, getLocalPort, getName, getPort, getProtocolEngine, getRemoteAddress, getSelectorThread, getSocketChannel, getThread, initialize, isSelectorThread, setProtocolEngine, setSelectionKey, setThread, wantsReadpublic SSLContextConnection()
public SSLContextConnection(boolean allowClientCertificate,
boolean requireClientCertificate)
public void registrationCompleted(java.nio.channels.SelectableChannel channel,
java.nio.channels.SelectionKey key,
SelectorThread selectorThread)
registrationCompleted in interface SelectorRegistrationListenerregistrationCompleted in class SocketConnectionchannel - SelectableChannelkey - SelectionKeyselectorThread - SelectorThreadpublic static javax.net.ssl.SSLContext getSSLContext()
throws java.io.IOException
java.lang.Exceptionjava.io.IOExceptionpublic static void initializeSSL()
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundExceptionjava.io.IOExceptionpublic boolean isConnected()
isConnected in class SocketConnectionpublic boolean processReadEvent()
processReadEvent in interface SocketHandlerprocessReadEvent in class SocketConnectionapplicationData - ByteBufferpublic boolean processWriteEvent()
processWriteEvent in interface SocketHandlerprocessWriteEvent in class SocketConnectionapplicationData - ByteBufferpublic boolean wantsWrite()
SocketHandlerwantsWrite in interface SocketHandlerwantsWrite in class SocketConnectionCopyright © 2021. All rights reserved.