Class NettySslServer

java.lang.Object
eu.cloudnetservice.driver.network.netty.NettySslServer
Direct Known Subclasses:
NettyHttpServer, NettyNetworkServer

@Internal public abstract class NettySslServer extends Object
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 Details

    • sslConfiguration

      protected final SSLConfiguration sslConfiguration
    • sslContext

      public io.netty5.handler.ssl.SslContext sslContext
  • Constructor Details

    • NettySslServer

      public NettySslServer(@Nullable @Nullable SSLConfiguration sslConfiguration)
      Constructs a new netty ssl server instance.
      Parameters:
      sslConfiguration - the ssl configuration of the server, or null if disabled.
  • Method Details

    • init

      protected void init() throws Exception
      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.