Class CertificateProvidedSslBuilder
java.lang.Object
io.micronaut.http.ssl.SslBuilder<io.netty.handler.ssl.SslContext>
io.micronaut.http.server.netty.ssl.AbstractServerSslBuilder
io.micronaut.http.server.netty.ssl.CertificateProvidedSslBuilder
- All Implemented Interfaces:
ApplicationEventListener<RefreshEvent>
,Ordered
,ServerSslBuilder
,RefreshEventListener
,EventListener
@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 AbstractServerSslBuilder
implements ServerSslBuilder, RefreshEventListener, Ordered
The Netty implementation of
SslBuilder
that generates an SslContext
to create a server handle with
SSL support via user configuration.-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Fields inherited from interface io.micronaut.runtime.context.scope.refresh.RefreshEventListener
DEFAULT_POSITION
-
Constructor Summary
ConstructorDescriptionCertificateProvidedSslBuilder
(HttpServerConfiguration httpServerConfiguration, ServerSslConfiguration ssl, ResourceResolver resourceResolver) -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of observed configuration prefixes that the event listener should listen for.int
getOrder()
void
onApplicationEvent
(RefreshEvent event) Handle an application event.Methods inherited from class io.micronaut.http.server.netty.ssl.AbstractServerSslBuilder
build, build, build, buildQuic, getKeyManagerFactory, processBuilder
Methods inherited from class io.micronaut.http.ssl.SslBuilder
getTrustManagerFactory, load
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.runtime.context.scope.refresh.RefreshEventListener
supports
Methods inherited from interface io.micronaut.http.server.netty.ssl.ServerSslBuilder
build, buildQuic
-
Constructor Details
-
CertificateProvidedSslBuilder
public CertificateProvidedSslBuilder(HttpServerConfiguration httpServerConfiguration, ServerSslConfiguration ssl, ResourceResolver resourceResolver) - Parameters:
httpServerConfiguration
- The HTTP server configurationssl
- The ssl configurationresourceResolver
- The resource resolver
-
-
Method Details
-
getSslConfiguration
- Specified by:
getSslConfiguration
in interfaceServerSslBuilder
- Returns:
- The SSL configuration
-
getTrustStore
- Overrides:
getTrustStore
in classSslBuilder<io.netty.handler.ssl.SslContext>
- Parameters:
ssl
- The ssl configuration- Returns:
- An optional
KeyStore
- Throws:
Exception
- if there is an error
-
getKeyStore
- Overrides:
getKeyStore
in classSslBuilder<io.netty.handler.ssl.SslContext>
- Parameters:
ssl
- The ssl configuration- Returns:
- An optional
KeyStore
- Throws:
Exception
- if there is an error
-
getObservedConfigurationPrefixes
Description copied from interface:RefreshEventListener
Returns the set of observed configuration prefixes that the event listener should listen for.- Specified by:
getObservedConfigurationPrefixes
in interfaceRefreshEventListener
- Returns:
- A set of prefixes
-
onApplicationEvent
Description copied from interface:ApplicationEventListener
Handle an application event.- Specified by:
onApplicationEvent
in interfaceApplicationEventListener<RefreshEvent>
- Parameters:
event
- the event to respond to
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceOrdered
- Specified by:
getOrder
in interfaceRefreshEventListener
- Returns:
- The order of the object. Defaults to zero (no order).
-