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 aJettyServerHelper
instance. -
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
String
getMainClassName()
int
getPort()
int
hashCode()
boolean
isAuthenticationRequired()
boolean
isEnabled()
boolean
isSslRequired()
static JettyServerHelper.Parameters
makeDisabledConfiguration(String mainClassName)
Make a trivial, disabled configuration.static JettyServerHelper.Parameters
makeFromConfiguration(String mainClassName, com.fishlib.configuration.Configuration configuration)
Construct a parameter struct for aJettyServerHelper
instance from the supplied main class name and configuration.String
toString()
JettyServerHelper.Parameters
withEnabled()
-
Constructor Details
-
Parameters
public Parameters(@NotNull String mainClassName, boolean enabled, boolean authenticationRequired, boolean sslRequired, int port)Construct a parameter struct for aJettyServerHelper
instance.- 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 aJettyServerHelper
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 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
-