More information: http://www.cs.berkeley.edu/~mdw/proj/seda/

seda.sandStorm.api
Interface ConfigDataIF

All Known Implementing Classes:
ConfigData

public interface ConfigDataIF

ConfigDataIF is used to pass configuration arguments to stages. When a stage is initialized, a ConfigDataIF is passed to its 'init()' method.

Author:
Matt Welsh

Field Summary
static java.lang.String SET
          The default value for a string key with no other specified value.
 
Method Summary
 boolean contains(java.lang.String key)
          Returns true if the given key is set in the configuration.
 boolean getBoolean(java.lang.String key)
          Get the boolean value corresponding to the given configuration key.
 double getDouble(java.lang.String key)
          Get the double value corresponding to the given configuration key.
 int getInt(java.lang.String key)
          Get the integer value corresponding to the given configuration key.
 ManagerIF getManager()
          Return a handle to the system manager.
 StageIF getStage()
          Return the StageIF for this stage.
 java.lang.String getString(java.lang.String key)
          Get the string value corresponding to the given configuration key.
 java.lang.String[] getStringList(java.lang.String key)
          Get the value corresponding to the given configuration key as a list of Strings.
 void setBoolean(java.lang.String key, boolean val)
          Set the given configuration key to the given boolean value.
 void setDouble(java.lang.String key, double val)
          Set the given configuration key to the given double value.
 void setInt(java.lang.String key, int val)
          Set the given configuration key to the given integer value.
 void setStage(StageIF stage)
          Used to set the StageIF when initializing a ConfigDataIF.
 void setString(java.lang.String key, java.lang.String val)
          Set the given configuration key to the given string value.
 void setStringList(java.lang.String key, java.lang.String[] values)
          Set the value corresponding to the given configuration key as a list of Strings.
 

Field Detail

SET

public static final java.lang.String SET
The default value for a string key with no other specified value.
Method Detail

contains

public boolean contains(java.lang.String key)
Returns true if the given key is set in the configuration.

getString

public java.lang.String getString(java.lang.String key)
Get the string value corresponding to the given configuration key. This is the basic way for a stage to retrieve its initialization arguments. Returns null if not set.

getInt

public int getInt(java.lang.String key)
Get the integer value corresponding to the given configuration key. This is the basic way for a stage to retrieve its initialization arguments. Returns -1 if not set or if the value is not an integer.

getDouble

public double getDouble(java.lang.String key)
Get the double value corresponding to the given configuration key. This is the basic way for a stage to retrieve its initialization arguments. Returns -1.0 if not set or if the value is not a double.

getBoolean

public boolean getBoolean(java.lang.String key)
Get the boolean value corresponding to the given configuration key. This is the basic way for a stage to retrieve its initialization arguments. Returns false if not set.

getStringList

public java.lang.String[] getStringList(java.lang.String key)
Get the value corresponding to the given configuration key as a list of Strings. Returns null if not set.

setString

public void setString(java.lang.String key,
                      java.lang.String val)
Set the given configuration key to the given string value.

setInt

public void setInt(java.lang.String key,
                   int val)
Set the given configuration key to the given integer value.

setDouble

public void setDouble(java.lang.String key,
                      double val)
Set the given configuration key to the given double value.

setBoolean

public void setBoolean(java.lang.String key,
                       boolean val)
Set the given configuration key to the given boolean value.

setStringList

public void setStringList(java.lang.String key,
                          java.lang.String[] values)
Set the value corresponding to the given configuration key as a list of Strings.

getManager

public ManagerIF getManager()
Return a handle to the system manager. The system manager can (among other things) be used to access other stages in the system.
See Also:
ManagerIF

getStage

public StageIF getStage()
Return the StageIF for this stage. The StageIF can be used (among other things) to access the event queues for this stage.
See Also:
StageIF

setStage

public void setStage(StageIF stage)
Used to set the StageIF when initializing a ConfigDataIF. This is an internal interface and not for use by applications.

More information: http://www.cs.berkeley.edu/~mdw/proj/seda/