Interface TLSConnection

All Superinterfaces:
AutoCloseable, Closeable, SocketConnection
All Known Implementing Classes:
NioTLSConnection

public interface TLSConnection extends SocketConnection
Represents a SocketConnection encrypted using Transport Layer Security (TLS).
Since:
2.1.0
  • Method Details

    • isConnected

      boolean isConnected()
      Returns true if the socket is connected and the TLS handshake has completed.
      Specified by:
      isConnected in interface SocketConnection
      Returns:
      true if this socket is connected and the TLS handshake has completed
      See Also:
    • isSocketConnected

      boolean isSocketConnected()
      Returns true if the underlying socket is connected.
      Returns:
      true if 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, null is returned.
      Returns:
      The application layer protocol name, or null if no negotiation occurred