Interface SslContextFactory

All Known Implementing Classes:
DefaultSslContextFactory, QuicSslContextFactory

public interface SslContextFactory
A factory for a Netty SslContext, the factory is configured with the fluent setters until create() to obtain a properly configured SslContext.
Author:
Julien Viet
  • Method Details

    • useAlpn

      default SslContextFactory useAlpn(boolean useAlpn)
      Set whether to use ALPN.
      Parameters:
      useAlpn - true to use ALPN
      Returns:
      a reference to this, so the API can be used fluently
    • forServer

      default SslContextFactory forServer(ClientAuth clientAuth)
      Configure the factory to build for server
      Parameters:
      clientAuth - the client auth to use
      Returns:
      a reference to this, so the API can be used fluently
    • forClient

      default SslContextFactory forClient(SNIServerName serverName, String endpointIdentificationAlgorithm)
      Configure the factory to build for client
      Parameters:
      serverName - the optional server name
      Returns:
      a reference to this, so the API can be used fluently
    • enabledProtocols

      default SslContextFactory enabledProtocols(Set<String> enabledProtocols)
    • keyMananagerFactory

      default SslContextFactory keyMananagerFactory(KeyManagerFactory kmf)
      Set the key manager factory to use.
      Parameters:
      kmf - the key manager factory instance
      Returns:
      a reference to this, so the API can be used fluently
    • trustManagerFactory

      default SslContextFactory trustManagerFactory(TrustManagerFactory tmf)
      Set the trust manager factory to use.
      Parameters:
      tmf - the trust manager factory instance
      Returns:
      a reference to this, so the API can be used fluently
    • enabledCipherSuites

      default SslContextFactory enabledCipherSuites(Set<String> enabledCipherSuites)
      Set the enabled cipher suites.
      Parameters:
      enabledCipherSuites - the set of cipher suites
      Returns:
      a reference to this, so the API can be used fluently
    • applicationProtocols

      default SslContextFactory applicationProtocols(List<String> applicationProtocols)
      Set the application protocols to use when using ALPN.
      Parameters:
      applicationProtocols - this list of application protocols
      Returns:
      a reference to this, so the API can be used fluently
    • create

      SslContext create() throws SSLException
      Returns:
      a configured SslContext
      Throws:
      SSLException