Class TlsConfig.BuilderBase.TlsConfigImpl

java.lang.Object
io.helidon.common.tls.TlsMaterial.BuilderBase.TlsMaterialImpl
io.helidon.common.tls.TlsConfig.BuilderBase.TlsConfigImpl
All Implemented Interfaces:
Prototype.Api, Prototype.Factory<Tls>, TlsConfig, TlsMaterial, Supplier<Tls>
Enclosing class:
TlsConfig.BuilderBase<BUILDER extends TlsConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends TlsConfig>

protected static class TlsConfig.BuilderBase.TlsConfigImpl extends TlsMaterial.BuilderBase.TlsMaterialImpl implements TlsConfig, Supplier<Tls>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
  • Constructor Details

    • TlsConfigImpl

      protected TlsConfigImpl(TlsConfig.BuilderBase<?,?> builder)
      Create an instance providing a builder.
      Parameters:
      builder - extending builder base of this prototype
  • Method Details

    • build

      public Tls build()
      Create a new runtime instance from this prototype.
      Specified by:
      build in interface Prototype.Factory<Tls>
      Returns:
      new configured runtime instance
    • get

      public Tls get()
      Specified by:
      get in interface Supplier<Tls>
    • sslContext

      public Optional<SSLContext> sslContext()
      Description copied from interface: TlsConfig
      Provide a fully configured SSLContext. If defined, a custom TLS manager and options for context creation, key or trust material, session cache size, and session timeout cannot be configured, and reload of Tls is not supported and will throw an exception. Engine-level options such as enabled protocols, cipher suites, client authentication, and application protocols are supported and are applied to engines created by the context.
      Specified by:
      sslContext in interface TlsConfig
      Returns:
      SSL context to use
    • manager

      public TlsManager manager()
      Description copied from interface: TlsConfig
      The configured TLS manager. If one is not explicitly defined in the config then a default manager will be created. Default is either a configuration based TLS manager, or an explicit manager when TlsConfig.sslContext() is provided. A Tls instance backed by the default ConfiguredTlsManager uses an isolated runtime manager, so this method returns its configured prototype rather than its runtime manager. Use Tls.generation() to obtain the runtime manager's material generation.
      Specified by:
      manager in interface TlsConfig
      Returns:
      the configured TLS manager
      See Also:
    • sslParameters

      public Optional<SSLParameters> sslParameters()
      Description copied from interface: TlsConfig
      Configure SSL parameters. This will always have a value, as we compute ssl parameters in a builder interceptor from configured options.
      Specified by:
      sslParameters in interface TlsConfig
      Returns:
      SSL parameters to use
    • applicationProtocols

      public List<String> applicationProtocols()
      Description copied from interface: TlsConfig
      Configure list of supported application protocols (such as h2) for application layer protocol negotiation (ALPN).
      Specified by:
      applicationProtocols in interface TlsConfig
      Returns:
      application protocols
    • endpointIdentificationAlgorithm

      public String endpointIdentificationAlgorithm()
      Description copied from interface: TlsConfig
      Identification algorithm for SSL endpoints.
      Specified by:
      endpointIdentificationAlgorithm in interface TlsConfig
      Returns:
      configure endpoint identification algorithm, or set to NONE to disable endpoint identification (equivalent to hostname verification). Defaults to "HTTPS"
    • enabled

      public boolean enabled()
      Description copied from interface: TlsConfig
      Flag indicating whether Tls is enabled. When disabled, all other configuration is ignored.
      Specified by:
      enabled in interface TlsConfig
      Returns:
      enabled flag
    • clientAuth

      public TlsClientAuth clientAuth()
      Description copied from interface: TlsConfig
      Configure requirement for mutual TLS.
      Specified by:
      clientAuth in interface TlsConfig
      Returns:
      what type of mutual TLS to use, defaults to TlsClientAuth.NONE
    • protocol

      public String protocol()
      Description copied from interface: TlsConfig
      Configure the protocol used to obtain an instance of SSLContext.
      Specified by:
      protocol in interface TlsConfig
      Returns:
      protocol to use, defaults to "TLS"
    • provider

      public Optional<String> provider()
      Description copied from interface: TlsConfig
      Use explicit provider to obtain an instance of SSLContext.
      Specified by:
      provider in interface TlsConfig
      Returns:
      provider to use, defaults to none (only TlsConfig.protocol() is used by default)
    • enabledCipherSuites

      public List<String> enabledCipherSuites()
      Description copied from interface: TlsConfig
      Enabled cipher suites for TLS communication.
      Specified by:
      enabledCipherSuites in interface TlsConfig
      Returns:
      cipher suites to enable, by default (or if list is empty), all available cipher suites are enabled
    • enabledProtocols

      public List<String> enabledProtocols()
      Description copied from interface: TlsConfig
      Enabled protocols for TLS communication. Example of valid values for TLS protocol: TLSv1.3, TLSv1.2
      Specified by:
      enabledProtocols in interface TlsConfig
      Returns:
      protocols to enable, by default (or if list is empty), all available protocols are enabled
    • sessionCacheSize

      public int sessionCacheSize()
      Description copied from interface: TlsConfig
      SSL session cache size.
      Specified by:
      sessionCacheSize in interface TlsConfig
      Returns:
      session cache size, defaults to 20480.
    • sessionTimeout

      public Duration sessionTimeout()
      Description copied from interface: TlsConfig
      SSL session timeout.
      Specified by:
      sessionTimeout in interface TlsConfig
      Returns:
      session timeout, defaults to "PT24H".
    • toString

      public String toString()
      Overrides:
      toString in class TlsMaterial.BuilderBase.TlsMaterialImpl
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class TlsMaterial.BuilderBase.TlsMaterialImpl
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class TlsMaterial.BuilderBase.TlsMaterialImpl