Class TlsSocket

java.lang.Object
io.helidon.common.socket.PlainSocket
io.helidon.common.socket.TlsSocket
All Implemented Interfaces:
HelidonSocket, SocketContext, Supplier<byte[]>

public final class TlsSocket extends PlainSocket
TLS socket.
  • Method Details

    • server

      public static TlsSocket server(SSLSocket delegate, String channelId, String serverChannelId)
      Create a server TLS socket.
      Parameters:
      delegate - underlying socket
      channelId - listener channel id
      serverChannelId - connection channel id
      Returns:
      a new TLS socket
    • client

      public static TlsSocket client(SSLSocket delegate, String channelId)
      Create a client TLS socket.
      Parameters:
      delegate - underlying socket
      channelId - channel id
      Returns:
      a new TLS socket
    • remotePeer

      public PeerInfo remotePeer()
      Description copied from interface: SocketContext
      Remote peer information.
      Specified by:
      remotePeer in interface SocketContext
      Overrides:
      remotePeer in class PlainSocket
      Returns:
      peer info
    • localPeer

      public PeerInfo localPeer()
      Description copied from interface: SocketContext
      Local peer information.
      Specified by:
      localPeer in interface SocketContext
      Overrides:
      localPeer in class PlainSocket
      Returns:
      peer info
    • isSecure

      public boolean isSecure()
      Description copied from interface: SocketContext
      Whether the request is secure.
      Specified by:
      isSecure in interface SocketContext
      Overrides:
      isSecure in class PlainSocket
      Returns:
      whether secure
    • protocolNegotiated

      public boolean protocolNegotiated()
      Description copied from interface: HelidonSocket
      Whether a protocol was negotiated by the socket (such as ALPN when using TLS).
      Returns:
      whether a protocol was negotiated
    • protocol

      public String protocol()
      Description copied from interface: HelidonSocket
      Protocol that was negotiated.
      Returns:
      protocol name