Package naga
Interface NIOSocketSSL
-
- All Superinterfaces:
NIOAbstractSocket,NIOSocket
public interface NIOSocketSSL extends NIOSocket
Interface for a SSL Socket- Author:
- Christoffer Lerno
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbeginHandshake()Initiates SSL-handshake, starts encrypted communication.javax.net.ssl.SSLEnginegetSSLEngine()Returns the SSLEngine in use for this socket.booleanisEncrypted()-
Methods inherited from interface naga.NIOAbstractSocket
close, getAddress, getIp, getPort, getTag, isOpen, setTag
-
Methods inherited from interface naga.NIOSocket
closeAfterWrite, getBytesRead, getBytesWritten, getMaxQueueSize, getTimeOpen, getWriteQueueSize, listen, queue, setMaxQueueSize, setPacketReader, setPacketWriter, socket, write, write
-
-
-
-
Method Detail
-
getSSLEngine
javax.net.ssl.SSLEngine getSSLEngine()
Returns the SSLEngine in use for this socket.- Returns:
- an SSLEngine.
-
beginHandshake
void beginHandshake() throws javax.net.ssl.SSLExceptionInitiates SSL-handshake, starts encrypted communication.- Throws:
javax.net.ssl.SSLException- if the handshake fails
-
isEncrypted
boolean isEncrypted()
- Returns:
- true if handshake is initiated and consequent data will be encrypted.
-
-