Class NettySslServer
java.lang.Object
eu.cloudnetservice.driver.network.netty.NettySslServer
- Direct Known Subclasses:
NettyHttpServer,NettyNetworkServer
A utility class for all netty based network servers to extends which simplifies creating an ssl context for the
current server, if enabled.
- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SSLConfigurationio.netty5.handler.ssl.SslContext -
Constructor Summary
ConstructorsConstructorDescriptionNettySslServer(@Nullable SSLConfiguration sslConfiguration) Constructs a new netty ssl server instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinit()Initializes the ssl context based on the given configuration if enabled.
-
Field Details
-
sslConfiguration
-
sslContext
public io.netty5.handler.ssl.SslContext sslContext
-
-
Constructor Details
-
NettySslServer
Constructs a new netty ssl server instance.- Parameters:
sslConfiguration- the ssl configuration of the server, or null if disabled.
-
-
Method Details
-
init
Initializes the ssl context based on the given configuration if enabled. If no certificate paths are defined the server will use self-signed certificates.- Throws:
Exception- if any exception occurs during reading of the certificates.
-