com.gridsystems.config.modules.jvm
Class JVMConfigurator

java.lang.Object
  extended by com.gridsystems.config.Configurator
      extended by com.gridsystems.config.modules.jvm.JVMConfigurator

public final class JVMConfigurator
extends Configurator

Java Virtual Machine Configurator implementation.

Version:
1.0
Author:
Rodrigo Ruiz Aguayo

Field Summary
 
Fields inherited from class com.gridsystems.config.Configurator
MODE_CONSOLE, MODE_SILENT, MODE_SWING
 
Method Summary
 void addFlags(java.util.Collection<java.lang.String> flags)
          Adds all flags in the specified collection to the flags set.
protected  ConfiguratorModel createModel()
          Creates a new model instance.
 boolean getBoolProperty(java.lang.String name, boolean def)
          Gets a system property value as a boolean.
protected  ConsoleConfiguratorView getConsoleView()
          Gets a view for Configurator.MODE_CONSOLE.
static JVMConfigurator getInstance()
          Singleton pattern implementation.
 int getIntProperty(java.lang.String name, int def)
          Gets a system property value as an int.
 java.lang.String getProperty(java.lang.String name, java.lang.String def)
          Gets a system property value.
protected  SwingConfiguratorView getSwingView()
          Gets a view for Configurator.MODE_SWING.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets a system property value.
 
Methods inherited from class com.gridsystems.config.Configurator
apply, discard, getBundle, getContextDir, getModel, getName, getPath, getUsername, getView, getViewMode, hasView, isClosing, setClosing, setErrorListener, setModel, setUsername, setViewMode, updateError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static JVMConfigurator getInstance()
Singleton pattern implementation.

Returns:
A unique instance of this class

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Sets a system property value.

Parameters:
name - The system property name
value - The system property value

getProperty

public java.lang.String getProperty(java.lang.String name,
                                    java.lang.String def)
Gets a system property value.

Parameters:
name - The system property name
def - The system property default value
Returns:
The system property value

getIntProperty

public int getIntProperty(java.lang.String name,
                          int def)
Gets a system property value as an int.

Parameters:
name - The system property name
def - The system property default value
Returns:
The int value of the system property

getBoolProperty

public boolean getBoolProperty(java.lang.String name,
                               boolean def)
Gets a system property value as a boolean.

Parameters:
name - The system property name
def - The system property default value
Returns:
The boolean value of the system property

addFlags

public void addFlags(java.util.Collection<java.lang.String> flags)
Adds all flags in the specified collection to the flags set.

Parameters:
flags - The collection of flags to add

getSwingView

protected SwingConfiguratorView getSwingView()
Gets a view for Configurator.MODE_SWING.

Specified by:
getSwingView in class Configurator
Returns:
The view

getConsoleView

protected ConsoleConfiguratorView getConsoleView()
Gets a view for Configurator.MODE_CONSOLE.

Specified by:
getConsoleView in class Configurator
Returns:
The view

createModel

protected ConfiguratorModel createModel()
Creates a new model instance.

Specified by:
createModel in class Configurator
Returns:
A newly created ConfiguratorModel instance


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.