Class JettyServerHelper.Parameters

java.lang.Object
com.illumon.util.jettyhelper.JettyServerHelper.Parameters
Enclosing class:
JettyServerHelper

public static class JettyServerHelper.Parameters extends Object
Parameter struct for creating JettyServerHelper instances.
  • Constructor Details

    • Parameters

      public Parameters(@NotNull String mainClassName, boolean enabled, boolean authenticationRequired, boolean sslRequired, int port)
      Construct a parameter struct for a JettyServerHelper instance.
      Parameters:
      mainClassName - The main class to use for logging or reporting
      enabled - Whether the web server is enabled
      authenticationRequired - Whether authentication is required
      sslRequired - Whether SSL is required
      port - The port for the web server
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • makeFromConfiguration

      public static JettyServerHelper.Parameters makeFromConfiguration(@NotNull String mainClassName, @NotNull com.fishlib.configuration.Configuration configuration)
      Construct a parameter struct for a JettyServerHelper instance from the supplied main class name and configuration.
      Parameters:
      mainClassName - The main class to use for logging or reporting, as well as property name prefixes
      configuration - The configuration to read properties from
      Returns:
      The new parameter struct
    • makeDisabledConfiguration

      public static JettyServerHelper.Parameters makeDisabledConfiguration(@NotNull String mainClassName)
      Make a trivial, disabled configuration.
      Parameters:
      mainClassName - The main class to use for logging or reporting
      Returns:
      The new parameter struct
    • getMainClassName

      public String getMainClassName()
    • isEnabled

      public boolean isEnabled()
    • isAuthenticationRequired

      public boolean isAuthenticationRequired()
    • isSslRequired

      public boolean isSslRequired()
    • getPort

      public int getPort()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • withEnabled

      public JettyServerHelper.Parameters withEnabled()