Interface TlsManager
- All Superinterfaces:
NamedService
- All Known Implementing Classes:
ConfiguredTlsManager
SSLContext identity and
managing the TlsReloadableComponent instances that provide its key and trust material.
Once the context is exposed through an Tls instance, its identity must not change.
Post-initialization material changes are published through the reload methods.-
Method Summary
Modifier and TypeMethodDescriptiondefault longGeneration of TLS material changes reported by this manager.voidInitializes this manager before any other method is called.The key manager in use.default voidDeprecated, for removal: This API element is subject to removal in a future version.default voidreload(TlsMaterial material) This method will multiplex the call to allTlsReloadableComponents that are being managed by this manager.SSL context created by this manager.The trust manager in use.Methods inherited from interface NamedService
name, typeModifier and TypeMethodDescriptionname()Name of this implementation, as provided inConfiguredProvider.create(Config, String).type()Type of this implementation, to distinguish instances of same type, with differentNamedService.name().
-
Method Details
-
init
Initializes this manager before any other method is called. This method is only called when TLS is enabled. In case TLS is disabled, none of the methods on this type can be called.A manager can be shared, so this method may be called more than once. Later calls must not replace state already exposed through an
Tlsinstance. Implementations may ignore later calls or reject incompatible configuration.- Parameters:
tls- TLS configuration
-
reload
Deprecated, for removal: This API element is subject to removal in a future version.usereload(TlsMaterial), this method will be removed in the next major version of HelidonThis method will multiplex the call to allTlsReloadableComponents that are being managed by this manager.- Parameters:
tls- the new tls instance- See Also:
-
reload
This method will multiplex the call to allTlsReloadableComponents that are being managed by this manager.- Parameters:
material- the new TLS material- See Also:
-
generation
default long generation()Generation of TLS material changes reported by this manager.The generation after the manager's first successful initialization is
0. An implementation that overrides this method must advance the value whenever key or trust material changes, including when a reload fails after it may have published a change. A concurrent read must not return while a material change is being published, and every direct or provider-driven material publication path must participate. All post-initialization publication paths must be serialized with the mechanism used by this method.A caller can obtain a coherent snapshot by reading the generation, obtaining the manager state, and then reading the generation again, accepting the snapshot only when both values are equal. An overriding implementation must ensure equal values mean no material publication crossed that interval.
The compatibility default always returns
0. A manager that supports reload but does not override this method does not report those reloads, so its generation may lag behind its current material.- Returns:
- current TLS material generation
-
sslContext
SSLContext sslContext()SSL context created by this manager. This method is called only afterinit(io.helidon.common.tls.TlsConfig)and only ifTlsConfig.enabled()istrue. The returned context identity must remain stable after the first successful initialization.- Returns:
- the SSL context to use
-
keyManager
-
trustManager
-
reload(TlsMaterial), this method will be removed in the next major version of Helidon