Class PortConfig

java.lang.Object
com.iizix.comm.PortConfig

public class PortConfig extends Object
Input-output class used to hold information of the started port of a category. It is used to configure the external host name if undefined.
Author:
Christopher Mindus
  • Field Details

    • port

      public final int port
      The port number, zero for none.
    • isHTTPS

      public final boolean isHTTPS
      Flag for HTTPS.
    • isFrontEndSecured

      public final boolean isFrontEndSecured
      Flag for secure port by means of front-end proxy, even if the isHTTPS flag is false.
    • bind

      public final String bind
      The bind address, null for none.
    • controller

      public final IPortController controller
      Interface for the port control, never null.
  • Constructor Details

    • PortConfig

      public PortConfig(int port, boolean isHTTPS, boolean isFrontEndSecured, String bind, IPortController controller)
      Constructor.
      Parameters:
      port - The port number, zero for none.
      isHTTPS - Flag for HTTPS.
      isFrontEndSecured - Flag for secure port by means of front-end proxy, even if the isHTTPS flag is false.
      bind - The bind address, null for none.
      controller - The port controller, never null.
  • Method Details

    • restartConnector

      public void restartConnector()
      Restarts the Jetty (HTTPS) server connector after Let's Encrypt domain certificate renewal.
    • isSamePortConfig

      public boolean isSamePortConfig(PortConfig portConfig)
      Checks if two port configurations are equal: i.e. the same bind address (or none), the port number, front-end secured.
      Parameters:
      portConfig - Another port configuration.
      Returns:
      true if the port configurations match, false otherwise.