Interface TlsManager

All Known Subinterfaces:
OciCertificatesTlsManager
All Known Implementing Classes:
ConfiguredTlsManager

public interface TlsManager
Implementors of this contract are responsible for managing the SSLContext instance lifecycle. When the context changes, it then has the responsible to notify WebServer.updateTls(WebServerTls).

How context changes are observed is based upon the implementation of the manager.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Always called before any other method on this type.
    SSL context created by this manager.
    void
    subscribe(Consumer<SSLContext> sslContextConsumer)
    Deprecated.
    this method will be removed in a future release.
  • Method Details

    • init

      void init(WebServerTls tls)
      Always called before any other method on this type. This method is only called when TLS is enabled and no explicit SSLContext was passed to the builder. In case the TLS is disabled, none of the methods on this type can be called.
      Parameters:
      tls - TLS configuration
    • subscribe

      @Deprecated void subscribe(Consumer<SSLContext> sslContextConsumer)
      Deprecated.
      this method will be removed in a future release.
      Callers can subscribe to updates to be notified when the SSL context changes.
      Parameters:
      sslContextConsumer - the consumer that will receive the new/update context after it has been reloaded by the manager
    • sslContext

      SSLContext sslContext()
      SSL context created by this manager. This method is called only after init(WebServerTls) and only if WebServerTls.enabled() is true.
      Returns:
      the SSL context to use