public class SSLContextConnection extends SocketConnection
closed, daemon, daemonContext, key, localAddr, localPort, protocolEngine, remoteAddr, remotePort, selectorThread, socketChannel, socketDataIn, socketDataOut| Constructor and Description |
|---|
SSLContextConnection()
Default constructor.
|
SSLContextConnection(boolean allowClientCertificate,
boolean requireClientCertificate) |
| Modifier and Type | Method and Description |
|---|---|
static 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.
|
protected boolean |
isDeferredConnectEvent() |
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)
This method is called once the socket is registered with a SelectorThread.
|
static void |
setEnabledCipherSuites(String[] aCipherSuites) |
static void |
setEnabledProtocols(String[] aProtocols) |
closeConnection, getDaemonContext, getIdleStates, getInterestedOps, getLocalAddress, getLocalPort, getPort, getProtocolEngine, getRemoteAddress, getSocketChannel, getThread, getUuid, initialize, isSelectorThread, setSelectionKey, setThread, setWriteStatepublic SSLContextConnection()
public SSLContextConnection(boolean allowClientCertificate,
boolean requireClientCertificate)
public void registrationCompleted(SelectableChannel channel, SelectionKey key)
registrationCompleted in interface SelectorRegistrationListenerregistrationCompleted in class SocketConnectionchannel - SelectableChannelkey - SelectionKeyselectorThread - SelectorThreadprotected boolean isDeferredConnectEvent()
isDeferredConnectEvent in class SocketConnectionpublic static SSLContext getSSLContext() throws IOException
ExceptionIOExceptionpublic static void initializeSSL()
throws FileNotFoundException,
IOException
FileNotFoundExceptionIOExceptionpublic 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 static void setEnabledProtocols(String[] aProtocols)
public static void setEnabledCipherSuites(String[] aCipherSuites)
Copyright © 2025. All rights reserved.