Interface ListenerTlsContext


public interface ListenerTlsContext
Listener TLS state shared with transport bindings.

Transport bindings that return TransportBinding.Security.TLS must use this context for TLS handshakes so listener default TLS, virtual-host TLS selection, and virtual-host TLS reloads remain consistent across all transport implementations.

  • Method Details

    • tls

      Tls tls()
      Default listener TLS configuration.
      Returns:
      listener TLS configuration
    • virtualHostsEnabled

      boolean virtualHostsEnabled()
      Whether listener virtual-host TLS selection is configured.
      Returns:
      whether virtual hosts are configured
    • validateVirtualHosts

      void validateVirtualHosts()
      Validate the listener virtual-host TLS configuration.
    • select

      ListenerTlsContext.Selection select(String presentedHost)
      Select TLS for a client-presented SNI host.

      The caller supplies the presented host unchanged. This method owns WebServer hostname normalization and validation.

      Parameters:
      presentedHost - SNI host presented by the client
      Returns:
      selected TLS and SNI context
      Throws:
      ListenerTlsContext.RejectedSniException - if the listener SNI policy rejects the host
    • selectWithoutSni

      ListenerTlsContext.Selection selectWithoutSni()
      Select TLS for a TLS ClientHello without SNI.
      Returns:
      selected TLS and SNI context
      Throws:
      ListenerTlsContext.RejectedSniException - if the listener SNI policy rejects missing SNI