@Requires(condition=io.micronaut.http.server.netty.ssl.SslEnabledCondition.class) @Requires(condition=io.micronaut.http.server.netty.ssl.CertificateProvidedSslBuilder.SelfSignedNotConfigured.class) @Singleton @Internal public class CertificateProvidedSslBuilder extends SslBuilder<io.netty.handler.ssl.SslContext> implements ServerSslBuilder, RefreshEventListener, Ordered
SslBuilder that generates an SslContext to create a server handle with
SSL support via user configuration.DEFAULT_POSITIONHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
CertificateProvidedSslBuilder(HttpServerConfiguration httpServerConfiguration,
ServerSslConfiguration ssl,
ResourceResolver resourceResolver) |
| Modifier and Type | Method and Description |
|---|---|
Optional<io.netty.handler.ssl.SslContext> |
build() |
Optional<io.netty.handler.ssl.SslContext> |
build(SslConfiguration ssl) |
Optional<io.netty.handler.ssl.SslContext> |
build(SslConfiguration ssl,
HttpVersion httpVersion) |
protected Optional<KeyStore> |
getKeyStore(SslConfiguration ssl) |
Set<String> |
getObservedConfigurationPrefixes()
Returns the set of observed configuration prefixes that the event listener should listen for.
|
int |
getOrder() |
ServerSslConfiguration |
getSslConfiguration() |
protected Optional<KeyStore> |
getTrustStore(SslConfiguration ssl) |
void |
onApplicationEvent(RefreshEvent event)
Handle an application event.
|
getKeyManagerFactory, getTrustManagerFactory, loadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsupportspublic CertificateProvidedSslBuilder(HttpServerConfiguration httpServerConfiguration, ServerSslConfiguration ssl, ResourceResolver resourceResolver)
httpServerConfiguration - The HTTP server configurationssl - The ssl configurationresourceResolver - The resource resolverpublic ServerSslConfiguration getSslConfiguration()
getSslConfiguration in interface ServerSslBuilderpublic Optional<io.netty.handler.ssl.SslContext> build()
build in interface ServerSslBuilderpublic Optional<io.netty.handler.ssl.SslContext> build(SslConfiguration ssl)
build in class SslBuilder<io.netty.handler.ssl.SslContext>ssl - The ssl configurationpublic Optional<io.netty.handler.ssl.SslContext> build(SslConfiguration ssl, HttpVersion httpVersion)
build in class SslBuilder<io.netty.handler.ssl.SslContext>ssl - The ssl configurationhttpVersion - The http versionprotected Optional<KeyStore> getTrustStore(SslConfiguration ssl) throws Exception
getTrustStore in class SslBuilder<io.netty.handler.ssl.SslContext>ssl - The ssl configurationKeyStoreException - if there is an errorprotected Optional<KeyStore> getKeyStore(SslConfiguration ssl) throws Exception
getKeyStore in class SslBuilder<io.netty.handler.ssl.SslContext>ssl - The ssl configurationKeyStoreException - if there is an errorpublic Set<String> getObservedConfigurationPrefixes()
RefreshEventListenergetObservedConfigurationPrefixes in interface RefreshEventListenerpublic void onApplicationEvent(RefreshEvent event)
ApplicationEventListeneronApplicationEvent in interface ApplicationEventListener<RefreshEvent>event - the event to respond topublic int getOrder()
getOrder in interface OrderedgetOrder in interface RefreshEventListener