Package com.illumon.util.jettyhelper
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 Summary
Constructors Constructor Description Parameters(String mainClassName, boolean enabled, boolean authenticationRequired, boolean sslRequired, int port)Construct a parameter struct for aJettyServerHelperinstance. -
Method Summary
Modifier and Type Method Description booleanequals(Object o)StringgetMainClassName()intgetPort()inthashCode()booleanisAuthenticationRequired()booleanisEnabled()booleanisSslRequired()static JettyServerHelper.ParametersmakeDisabledConfiguration(String mainClassName)Make a trivial, disabled configuration.static JettyServerHelper.ParametersmakeFromConfiguration(String mainClassName, com.fishlib.configuration.Configuration configuration)Construct a parameter struct for aJettyServerHelperinstance from the supplied main class name and configuration.StringtoString()JettyServerHelper.ParameterswithEnabled()
-
Constructor Details
-
Parameters
public Parameters(@NotNull String mainClassName, boolean enabled, boolean authenticationRequired, boolean sslRequired, int port)Construct a parameter struct for aJettyServerHelperinstance.- Parameters:
mainClassName- The main class to use for logging or reportingenabled- Whether the web server is enabledauthenticationRequired- Whether authentication is requiredsslRequired- Whether SSL is requiredport- The port for the web server
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
makeFromConfiguration
public static JettyServerHelper.Parameters makeFromConfiguration(@NotNull String mainClassName, @NotNull com.fishlib.configuration.Configuration configuration)Construct a parameter struct for aJettyServerHelperinstance from the supplied main class name and configuration.- Parameters:
mainClassName- The main class to use for logging or reporting, as well as property name prefixesconfiguration- 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
-
isEnabled
public boolean isEnabled() -
isAuthenticationRequired
public boolean isAuthenticationRequired() -
isSslRequired
public boolean isSslRequired() -
getPort
public int getPort() -
toString
-
withEnabled
-