|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gridsystems.config.modules.tomcat.TomcatConfigModel
public class TomcatConfigModel
Data model for the Tomcat configurator.
Field Summary | |
---|---|
protected static int |
ALLOWED_IP_TYPE
Allowed type of the IPs. |
static int |
DEFAULT_HTTP_PORT
Default HTTP port. |
static boolean |
DEFAULT_HTTPS_ENABLED
Default HTTPS enabled flag. |
static int |
DEFAULT_HTTPS_PORT
Default HTTPS port. |
static java.lang.String |
DEFAULT_KEYSTORE_DIR
Default keystore directory. |
static java.lang.String |
DEFAULT_KEYSTORE_PASS
Default keystore password. |
static int |
DEFAULT_RESTART_CODE
Default server restart exit code. |
static boolean |
DEFAULT_RESTART_ENABLED
Default server restart enabled flag. |
static int |
DEFAULT_SHUTDOWN_CODE
Default server shutdown exit code. |
static int |
DEFAULT_SHUTDOWN_PORT
Default shutdown port. |
static java.lang.String |
HOST_IP
Property key name for the IP Address field. |
Constructor Summary | |
---|---|
TomcatConfigModel()
Default constructor. |
|
TomcatConfigModel(TomcatConfigModel m)
Creates a new instance. |
Method Summary | |
---|---|
void |
addConnector(Connector c)
Adds a connector to the list. |
void |
apply()
Performs changes in files external to the model data. |
Connector[] |
getConnectors()
Gets the list of connectors. |
static java.lang.String |
getCustomizerString(java.lang.String key)
Gets customizer string value from key. |
int |
getHttpPort()
Gets the HTTP port. |
int |
getHttpsPort()
Gets the HTTPS port. |
java.lang.String |
getIp()
Gets the IP address of the host. |
java.io.File |
getKeystoreDir()
Gets the keystore directory. |
java.lang.String |
getKeystorePassword()
Gets the keystore password. |
protected java.lang.String |
getKeystorePath()
Gets the canonical path to the keystore directory. |
Connector |
getMaidenPort()
Gets the port to be used by the Server Maiden. |
static java.lang.String |
getProductName()
Gets the name of the product to Install. |
int |
getRestartExitCode()
Gets the restart exit code. |
int |
getShutdownExitCode()
Gets the shutdown exit code. |
int |
getShutdownPort()
Gets the shutdown port. |
boolean |
isHttpsEnabled()
Gets the "HTTPS enabled" flag value. |
boolean |
isRestartEnabled()
Gets the "Restart enabled" flag value. |
void |
load()
Loads the model from persistence layer. |
void |
setConnectors(Connector[] cc)
Sets the list of connectors. |
void |
setIp(java.lang.String ip)
Sets the IP address of the host. |
void |
setKeystoreDir(java.io.File dir)
Sets the keystore directory. |
void |
setKeystorePassword(java.lang.String pass)
Sets the keystore password. |
void |
setRestartEnabled(boolean enabled)
Enables or disables the restart control. |
void |
setRestartExitCode(int exitCode)
Sets the exit code that will instruct the daemon to restart the server. |
void |
setShutdownExitCode(int exitCode)
Sets the exit code that will instruct the daemon to not restart the server. |
void |
setShutdownPort(int port)
Sets the port number for shutdown requests. |
void |
setShutdownPort(java.lang.String s)
Sets the port for shutdown requests. |
void |
store()
Stores the model in the persistence layer. |
void |
validate()
Validate data of this Model. |
void |
validate(Connector[] conns)
Validate data of this Model. |
void |
validate(java.util.List conns)
Validate data of this Model. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int ALLOWED_IP_TYPE
public static final java.lang.String HOST_IP
public static final int DEFAULT_SHUTDOWN_PORT
public static final int DEFAULT_HTTP_PORT
public static final int DEFAULT_HTTPS_PORT
public static final int DEFAULT_RESTART_CODE
public static final int DEFAULT_SHUTDOWN_CODE
public static final boolean DEFAULT_RESTART_ENABLED
public static final boolean DEFAULT_HTTPS_ENABLED
public static final java.lang.String DEFAULT_KEYSTORE_DIR
public static final java.lang.String DEFAULT_KEYSTORE_PASS
Constructor Detail |
---|
public TomcatConfigModel()
public TomcatConfigModel(TomcatConfigModel m)
m
- The new model from which the old keystore password
must be takenMethod Detail |
---|
public static java.lang.String getProductName()
public static java.lang.String getCustomizerString(java.lang.String key)
key
- Key of String.
protected java.lang.String getKeystorePath()
public void load()
ConfiguratorModel
load
in interface ConfiguratorModel
ConfiguratorModel.load()
public void store() throws java.io.IOException
store
in interface ConfiguratorModel
java.io.IOException
- In case of write errorpublic void apply() throws java.io.IOException
apply
in interface ConfiguratorModel
java.io.IOException
- In case of write errorpublic java.lang.String getIp()
public void setIp(java.lang.String ip)
ip
- a String with the IP address of the host.public int getHttpPort()
public int getShutdownPort()
public int getHttpsPort()
public Connector getMaidenPort()
public boolean isHttpsEnabled()
public boolean isRestartEnabled()
public int getRestartExitCode()
public int getShutdownExitCode()
public void setShutdownPort(int port)
port
- The port numberpublic void setShutdownPort(java.lang.String s)
s
- The port number. The default value is 8085.
If s is not a valid number, the default value will be set.public void setRestartEnabled(boolean enabled)
enabled
- Whether or not restart control must be enabledpublic void setRestartExitCode(int exitCode)
exitCode
- the exit code for restartspublic void setShutdownExitCode(int exitCode)
exitCode
- The exit code for shutdownspublic java.io.File getKeystoreDir()
public void setKeystoreDir(java.io.File dir)
dir
- The keystore directorypublic java.lang.String getKeystorePassword()
public void setKeystorePassword(java.lang.String pass)
pass
- The keystore passwordpublic Connector[] getConnectors()
public void setConnectors(Connector[] cc) throws java.lang.Exception
cc
- the list of connectors
java.lang.Exception
- If a validation error occurspublic void addConnector(Connector c)
c
- the connectorpublic void validate(java.util.List conns) throws java.lang.Exception
conns
- the list of connectors to validate
java.lang.Exception
- In case of invalid datapublic void validate(Connector[] conns) throws java.lang.Exception
conns
- the list of connectors to validate
java.lang.Exception
- In case of invalid datapublic void validate() throws java.lang.Exception
validate
in interface ConfiguratorModel
java.lang.Exception
- In case of invalid data
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |