Interface TlsManagerProvider

All Known Implementing Classes:
DefaultOciCertificatesTlsManagerProvider

public interface TlsManagerProvider
ServiceLoader service provider for TlsManager.
  • Method Details

    • configKey

      String configKey()
      Key this service implementation is stored under. This is also considered the service "type" when used in a list in configuration, to allow the same service defined more than once.
      Returns:
      key of this implementation
    • create

      TlsManager create(Config config, String name)
      Create a new instance from the configuration located on the provided node.
      Parameters:
      config - located at configKey() node
      name - name of the configured implementation
      Returns:
      a new instance created from this config node
    • getOrCreate

      static <T> TlsManager getOrCreate(T configBean, Function<T,TlsManager> creator)
      Provides the ability to have a unique TlsManager per unique Config instance provided.
      Type Parameters:
      T - the type of the config bean
      Parameters:
      configBean - the config bean instance
      creator - the creator to apply if not already in cache, which takes the config bean instance
      Returns:
      the tls manager instance from cache, defaulting to creation from the creator if not in cache
    • create

      static TlsManager create(Config config)
      Takes a configuration and looks for a suitable TlsManager instance based upon that configuration.
      Parameters:
      config - the configuration
      Returns:
      a TLS manager instance
      Throws:
      IllegalStateException - if the configuration is invalid or if the named provider is not found