|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.environment.params.simple.SimpleParameters
This class represents a generic Java process launching program which reads in preferences from a preferences file and then invokes another JVM using those prefs. If the launched JVM dies, this process can be configured to restart the JVM any number of times before giving up. This process can also be configured to launch the second JVM with a specified memory allocation, etc...
Nested Class Summary | |
protected class |
SimpleParameters.MyProperties
DESCRIBE THE CLASS |
Constructor Summary | |
SimpleParameters(java.lang.String[] orderedDefaults,
java.lang.String mutableConfigFileName)
|
Method Summary | |
void |
addChangeListener(ParameterChangeListener p)
Adds a feature to the ChangeListener attribute of the SimpleParameters object |
boolean |
contains(java.lang.String name)
DESCRIBE THE METHOD |
java.util.Enumeration |
enumerateDefaults()
DESCRIBE THE METHOD |
java.util.Enumeration |
enumerateNonDefaults()
DESCRIBE THE METHOD |
boolean |
getBoolean(java.lang.String name)
Gets the Boolean attribute of the SimpleParameters object |
double |
getDouble(java.lang.String name)
Gets the Double attribute of the SimpleParameters object |
float |
getFloat(java.lang.String name)
Gets the Float attribute of the SimpleParameters object |
java.net.InetAddress |
getInetAddress(java.lang.String name)
Gets the InetAddress attribute of the SimpleParameters object |
java.net.InetSocketAddress |
getInetSocketAddress(java.lang.String name)
Gets the InetSocketAddress attribute of the SimpleParameters object |
java.net.InetSocketAddress[] |
getInetSocketAddressArray(java.lang.String name)
Gets the InetSocketAddressArray attribute of the SimpleParameters object |
int |
getInt(java.lang.String name)
Gets the Int attribute of the SimpleParameters object |
long |
getLong(java.lang.String name)
Gets the Long attribute of the SimpleParameters object |
protected java.lang.String |
getProperty(java.lang.String name)
Gets the Property attribute of the SimpleParameters object |
java.lang.String |
getString(java.lang.String name)
Gets the String attribute of the SimpleParameters object |
java.lang.String[] |
getStringArray(java.lang.String name)
Gets the StringArray attribute of the SimpleParameters object |
protected java.net.InetSocketAddress |
parseInetSocketAddress(java.lang.String name)
DESCRIBE THE METHOD |
void |
remove(java.lang.String name)
DESCRIBE THE METHOD |
void |
removeChangeListener(ParameterChangeListener p)
DESCRIBE THE METHOD |
void |
setBoolean(java.lang.String name,
boolean value)
Sets the Boolean attribute of the SimpleParameters object |
void |
setDouble(java.lang.String name,
double value)
Sets the Double attribute of the SimpleParameters object |
void |
setFloat(java.lang.String name,
float value)
Sets the Float attribute of the SimpleParameters object |
void |
setInetAddress(java.lang.String name,
java.net.InetAddress value)
Sets the InetAddress attribute of the SimpleParameters object |
void |
setInetSocketAddress(java.lang.String name,
java.net.InetSocketAddress value)
Sets the InetSocketAddress attribute of the SimpleParameters object |
void |
setInetSocketAddressArray(java.lang.String name,
java.net.InetSocketAddress[] value)
Sets the InetSocketAddressArray attribute of the SimpleParameters object |
void |
setInt(java.lang.String name,
int value)
Sets the Int attribute of the SimpleParameters object |
void |
setLong(java.lang.String name,
long value)
Sets the Long attribute of the SimpleParameters object |
protected void |
setProperty(java.lang.String name,
java.lang.String value)
Note, this method does not implicitly call store() |
void |
setString(java.lang.String name,
java.lang.String value)
Sets the String attribute of the SimpleParameters object |
void |
setStringArray(java.lang.String name,
java.lang.String[] value)
Sets the StringArray attribute of the SimpleParameters object |
void |
store()
DESCRIBE THE METHOD |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleParameters(java.lang.String[] orderedDefaults, java.lang.String mutableConfigFileName)
orderedDefaults
- mutableConfigFileName
- if this is null, no params are saved, if this
file doesn't exist, you will get a warning printed to stdErr, then the
file will be created if you ever store
java.io.IOException
Method Detail |
protected java.lang.String getProperty(java.lang.String name)
name
- DESCRIBE THE PARAMETER
public int getInt(java.lang.String name)
getInt
in interface Parameters
name
- DESCRIBE THE PARAMETER
public double getDouble(java.lang.String name)
getDouble
in interface Parameters
name
- DESCRIBE THE PARAMETER
public float getFloat(java.lang.String name)
getFloat
in interface Parameters
name
- DESCRIBE THE PARAMETER
public long getLong(java.lang.String name)
getLong
in interface Parameters
name
- DESCRIBE THE PARAMETER
public boolean getBoolean(java.lang.String name)
getBoolean
in interface Parameters
name
- DESCRIBE THE PARAMETER
public java.net.InetAddress getInetAddress(java.lang.String name) throws java.net.UnknownHostException
getInetAddress
in interface Parameters
name
- DESCRIBE THE PARAMETER
java.net.UnknownHostException
- DESCRIBE THE EXCEPTIONpublic java.net.InetSocketAddress getInetSocketAddress(java.lang.String name) throws java.net.UnknownHostException
getInetSocketAddress
in interface Parameters
name
- DESCRIBE THE PARAMETER
java.net.UnknownHostException
- DESCRIBE THE EXCEPTIONpublic java.net.InetSocketAddress[] getInetSocketAddressArray(java.lang.String name) throws java.net.UnknownHostException
getInetSocketAddressArray
in interface Parameters
name
- DESCRIBE THE PARAMETER
java.net.UnknownHostException
- DESCRIBE THE EXCEPTIONpublic java.lang.String getString(java.lang.String name)
getString
in interface Parameters
name
- DESCRIBE THE PARAMETER
public java.lang.String[] getStringArray(java.lang.String name)
getStringArray
in interface Parameters
name
- DESCRIBE THE PARAMETER
protected void setProperty(java.lang.String name, java.lang.String value)
name
- value
- store()
public void setInt(java.lang.String name, int value)
setInt
in interface Parameters
name
- The new Int valuevalue
- The new Int valuepublic void setDouble(java.lang.String name, double value)
setDouble
in interface Parameters
name
- The new Double valuevalue
- The new Double valuepublic void setFloat(java.lang.String name, float value)
setFloat
in interface Parameters
name
- The new Float valuevalue
- The new Float valuepublic void setLong(java.lang.String name, long value)
setLong
in interface Parameters
name
- The new Long valuevalue
- The new Long valuepublic void setBoolean(java.lang.String name, boolean value)
setBoolean
in interface Parameters
name
- The new Boolean valuevalue
- The new Boolean valuepublic void setInetAddress(java.lang.String name, java.net.InetAddress value)
setInetAddress
in interface Parameters
name
- The new InetAddress valuevalue
- The new InetAddress valuepublic void setInetSocketAddress(java.lang.String name, java.net.InetSocketAddress value)
setInetSocketAddress
in interface Parameters
name
- The new InetSocketAddress valuevalue
- The new InetSocketAddress valuepublic void setInetSocketAddressArray(java.lang.String name, java.net.InetSocketAddress[] value)
setInetSocketAddressArray
in interface Parameters
name
- The new InetSocketAddressArray valuevalue
- The new InetSocketAddressArray valuepublic void setString(java.lang.String name, java.lang.String value)
setString
in interface Parameters
name
- The new String valuevalue
- The new String valuepublic void setStringArray(java.lang.String name, java.lang.String[] value)
setStringArray
in interface Parameters
name
- The new StringArray valuevalue
- The new StringArray valuepublic java.util.Enumeration enumerateDefaults()
public java.util.Enumeration enumerateNonDefaults()
protected java.net.InetSocketAddress parseInetSocketAddress(java.lang.String name) throws java.net.UnknownHostException
name
- DESCRIBE THE PARAMETER
java.net.UnknownHostException
- DESCRIBE THE EXCEPTIONpublic void remove(java.lang.String name)
remove
in interface Parameters
name
- DESCRIBE THE PARAMETERpublic boolean contains(java.lang.String name)
contains
in interface Parameters
name
- DESCRIBE THE PARAMETER
public void store() throws java.io.IOException
store
in interface Parameters
java.io.IOException
- DESCRIBE THE EXCEPTIONpublic void addChangeListener(ParameterChangeListener p)
addChangeListener
in interface Parameters
p
- The feature to be added to the ChangeListener attributepublic void removeChangeListener(ParameterChangeListener p)
removeChangeListener
in interface Parameters
p
- DESCRIBE THE PARAMETER
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |