|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gridsystems.config.modules.jvm.JVMConfigModel
public class JVMConfigModel
Data Model for the JVM Configurator.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_CONFIG_PATH
Path to the configuration file. |
static java.lang.String |
DEFAULT_DEBUG_MODE
Default remote debug mode. |
static java.lang.String |
DEFAULT_DEBUG_PORT
Default remote debug port. |
static java.lang.String |
DEFAULT_DEBUG_SUSPEND
Default initial suspension flag in debug mode. |
static java.lang.String |
DEFAULT_HEAP_MAX
Default max heap size. |
static java.lang.String |
DEFAULT_HEAP_MIN
Default min heap size. |
static java.lang.String |
DEFAULT_PROXY_HOST
Default proxy host name or IP address. |
static java.lang.String |
DEFAULT_PROXY_PORT
Default proxy port. |
static java.lang.String |
DEFAULT_STACK_SIZE
Default thread stack size. |
static java.lang.String |
DEFAULT_USE_PROXY
Default proxy usage mode. |
Constructor Summary | |
---|---|
JVMConfigModel(java.lang.String configFilePath)
Creates a new instance. |
Method Summary | |
---|---|
void |
addFlags(java.util.Collection<java.lang.String> flags)
Adds a collection of command-line flags to the current set. |
void |
apply()
Performs changes in files external to the model data. |
void |
copyModel(JVMConfigModel src)
Copies the specified model data into this instance. |
java.lang.String |
getDebugEnabled()
Gets whether debug mode is enabled or not. |
java.lang.String |
getDebugPort()
Gets the remote debug port. |
java.lang.String |
getDebugSuspend()
Gets whether the server JVM will start suspended. |
java.lang.String |
getMaxHeap()
Gets the JVM heap maximum size. |
java.lang.String |
getMinHeap()
Gets the JVM heap minimum size. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String def)
Gets a system property. |
java.lang.String |
getProxyHost()
Gets the proxy host name / IP. |
java.lang.String |
getProxyPort()
Gets the proxy port. |
java.lang.String |
getStackSize()
Gets the JVM thread-stack size. |
java.lang.String |
getString(java.lang.String key)
Gets a localized string. |
java.lang.String |
getString(java.lang.String key,
java.lang.Object[] params)
Gets a localized string, using the found string as a pattern to be used by a MessageFormat instance. |
java.lang.String |
getUseProxy()
Gets whether proxy use is enabled or not. |
java.lang.String |
getValue(java.lang.String key,
java.lang.String def)
Gets a field value. |
void |
load()
Loads the model from persistence layer. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets a system property. |
void |
setValue(java.lang.String key,
java.lang.Object value)
Sets a field value. |
void |
store()
Stores the model in the persistence layer. |
void |
validate()
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 |
---|
public static final java.lang.String DEFAULT_HEAP_MAX
public static final java.lang.String DEFAULT_HEAP_MIN
public static final java.lang.String DEFAULT_STACK_SIZE
public static final java.lang.String DEFAULT_USE_PROXY
public static final java.lang.String DEFAULT_PROXY_HOST
public static final java.lang.String DEFAULT_PROXY_PORT
public static final java.lang.String DEFAULT_DEBUG_MODE
public static final java.lang.String DEFAULT_DEBUG_PORT
public static final java.lang.String DEFAULT_DEBUG_SUSPEND
public static final java.lang.String DEFAULT_CONFIG_PATH
Constructor Detail |
---|
public JVMConfigModel(java.lang.String configFilePath)
configFilePath
- Path to file where read properties.Method Detail |
---|
public void setProperty(java.lang.String key, java.lang.String value)
key
- The system property namevalue
- The system property valuepublic void setValue(java.lang.String key, java.lang.Object value)
key
- The field namevalue
- The field valuepublic java.lang.String getValue(java.lang.String key, java.lang.String def)
key
- The field namedef
- The default field value
public java.lang.String getProperty(java.lang.String key, java.lang.String def)
key
- The system property namedef
- The system property default value
public void addFlags(java.util.Collection<java.lang.String> flags)
flags
- The flags collectionpublic java.lang.String getMinHeap()
public java.lang.String getMaxHeap()
public java.lang.String getStackSize()
public java.lang.String getUseProxy()
public java.lang.String getProxyHost()
public java.lang.String getProxyPort()
public java.lang.String getDebugEnabled()
public java.lang.String getDebugPort()
public java.lang.String getDebugSuspend()
public void copyModel(JVMConfigModel src)
src
- The source modelpublic 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 void validate() throws java.io.IOException
validate
in interface ConfiguratorModel
java.io.IOException
- In case of invalid datapublic java.lang.String getString(java.lang.String key)
key
- The i18n key
java.lang.NullPointerException
- if the bundle is not setpublic java.lang.String getString(java.lang.String key, java.lang.Object[] params)
key
- The key for the localized patternparams
- The parameters for pattern substitution
java.lang.NullPointerException
- if the bundle is not set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |