Package org.omegazero.net.socket
Interface TLSConnection
- All Superinterfaces:
AutoCloseable,Closeable,SocketConnection
- All Known Implementing Classes:
NioTLSConnection
Represents a
SocketConnection encrypted using Transport Layer Security (TLS).- Since:
- 2.1.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the application layer protocol name negotiated using a mechanism such as Application-Layer Protocol Negotiation (ALPN).Returns the name of the TLS cipher suite used for this connection.Returns the name of the protocol used for this connection.booleanReturnstrueif the socket is connected and the TLS handshake has completed.booleanReturnstrueif the underlying socket is connected.Methods inherited from interface org.omegazero.net.socket.SocketConnection
close, connect, destroy, flush, getApparentRemoteAddress, getLastIOTime, getLocalAddress, getRemoteAddress, hasConnected, hasDisconnected, isWritable, off, on, on, on, once, read, setApparentRemoteAddress, setOnClose, setOnConnect, setOnData, setOnError, setOnTimeout, setOnWritable, setReadBlock, write, write, write, writeQueue, writeQueue
-
Method Details
-
isConnected
boolean isConnected()Returnstrueif the socket is connected and the TLS handshake has completed.- Specified by:
isConnectedin interfaceSocketConnection- Returns:
trueif this socket is connected and the TLS handshake has completed- See Also:
-
isSocketConnected
boolean isSocketConnected()Returnstrueif the underlying socket is connected.- Returns:
trueif this socket is connected- See Also:
-
getProtocol
String getProtocol()Returns the name of the protocol used for this connection.- Returns:
- The protocol name
-
getCipher
String getCipher()Returns the name of the TLS cipher suite used for this connection.- Returns:
- The TLS cipher name
-
getApplicationProtocol
String getApplicationProtocol()Returns the application layer protocol name negotiated using a mechanism such as Application-Layer Protocol Negotiation (ALPN). If no such negotiation occurred or is not supported by the protocol or implementation,nullis returned.- Returns:
- The application layer protocol name, or
nullif no negotiation occurred
-