Package io.micronaut.http.server.netty
Interface NettyEmbeddedServerFactory
- All Known Implementing Classes:
DefaultNettyEmbeddedServerFactory
public interface NettyEmbeddedServerFactory
A factory / strategy interface for creating instances of
NettyEmbeddedServer
.- Since:
- 3.1.0
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescriptionbuild
(@NonNull NettyHttpServerConfiguration configuration) Builds aNettyEmbeddedServer
for the given configuration.default @NonNull NettyEmbeddedServer
build
(@NonNull NettyHttpServerConfiguration configuration, @Nullable ServerSslConfiguration sslConfiguration) Builds aNettyEmbeddedServer
for the given configuration.
-
Method Details
-
build
@NonNull @NonNull NettyEmbeddedServer build(@NonNull @NonNull NettyHttpServerConfiguration configuration) Builds aNettyEmbeddedServer
for the given configuration.Note that the returned server instance should be closed gracefully by calling the
NettyEmbeddedServer.stop()
method.- Parameters:
configuration
- The configuration, nevernull
- Returns:
- A
NettyEmbeddedServer
instance
-
build
@NonNull default @NonNull NettyEmbeddedServer build(@NonNull @NonNull NettyHttpServerConfiguration configuration, @Nullable @Nullable ServerSslConfiguration sslConfiguration) Builds aNettyEmbeddedServer
for the given configuration.Note that the returned server instance should be closed gracefully by calling the
NettyEmbeddedServer.stop()
method.- Parameters:
configuration
- The configuration, nevernull
sslConfiguration
- The SSL configuration, can benull
if SSL is not required- Returns:
- A
NettyEmbeddedServer
instance - Since:
- 3.1.4
-