|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent
de.cau.cs.kieler.sim.kiem.config.data.ConfigDataComponent
public class ConfigDataComponent
Holds all information needed for the currently running schedule.
For example:
Aimed Step Duration
Timeouts
...and user defined variables
Field Summary | |
---|---|
static String |
CONFIG_ID
The key for the config component. |
Fields inherited from class de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent |
---|
MASTER_CMD_MACROSTEP, MASTER_CMD_PAUSE, MASTER_CMD_RUN, MASTER_CMD_STEP, MASTER_CMD_STEPBACK, MASTER_CMD_STOP |
Constructor Summary | |
---|---|
ConfigDataComponent()
Creates a new ConfigDataComponent. |
|
ConfigDataComponent(boolean initWithDefaults)
Creates a new ConfigDataComponent. |
Method Summary | |
---|---|
KiemProperty |
findProperty(KiemPropertyKeyWrapper key)
Try to find the property in this configuration. |
String |
findPropertyValue(KiemPropertyKeyWrapper key)
Try to find the value of a property in this configuration. |
static ConfigDataComponent |
fromString(String input)
Creates a new data component from a String. |
String |
getDataComponentId()
Gets the String representation id of a DataComponent. |
DataComponentWrapper |
getWrapper()
Getter for the wrapper. |
void |
initialize()
Initialize. |
boolean |
isInvisible()
If the component doesn't want to appear in the scheduling list, it may set this flag to true. |
boolean |
isObserver()
To check whether the DataComponent is an observer. |
boolean |
isProducer()
To check whether the DataComponent is a producer. |
KiemProperty[] |
provideProperties()
Provide properties for this component. |
void |
removeProperty(KiemPropertyKeyWrapper key)
Remove properties with a specified key. |
void |
setWrapper(DataComponentWrapper wrapperParam)
Setter for the wrapper. |
JSONObject |
step(JSONObject jSONObject)
Step method for a DataObserver and a DataPrroducer. |
String |
toString()
|
KiemProperty |
updateProperty(KiemPropertyKeyWrapper key,
String value)
Update the property with a new value. |
void |
wrapup()
Wrap-up. |
Methods inherited from class de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent |
---|
getInitialVariables, provideFilterKeysJSON, provideInitialVariables, setInitialVariables |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String CONFIG_ID
Constructor Detail |
---|
public ConfigDataComponent()
public ConfigDataComponent(boolean initWithDefaults)
initWithDefaults
- true if the component should initialize from defaultsMethod Detail |
---|
public KiemProperty findProperty(KiemPropertyKeyWrapper key) throws KiemPropertyException
key
- the key to look for.
KiemPropertyException
- if no property was found.public final String findPropertyValue(KiemPropertyKeyWrapper key) throws KiemPropertyException
key
- the key to look for.
KiemPropertyException
- if no value was found.public final void removeProperty(KiemPropertyKeyWrapper key)
key
- the key to look for.public final KiemProperty updateProperty(KiemPropertyKeyWrapper key, String value)
If the property doesn't exist yet it will be created and initialized with the new value.
key
- the key of the property to look for.value
- the new value of the property.
public void initialize() throws KiemInitializationException
KiemInitializationException
.
KiemInitializationException
- a KiemInitializationExceptionpublic final String getDataComponentId()
AbstractDataComponent
getDataComponentId
in class AbstractDataComponent
public final boolean isObserver()
public final boolean isProducer()
public void wrapup() throws KiemInitializationException
KiemInitializationException
.
KiemInitializationException
- a KiemInitializationExceptionpublic JSONObject step(JSONObject jSONObject) throws KiemExecutionException
KiemExecutionException
that is then catched by the execution manager an brought to
the user's attention.
jSONObject
- the concrete JSONObject of input data (if observer)
KiemExecutionException
- a KiemExecutionExceptionpublic static ConfigDataComponent fromString(String input)
input
- the input string.
public String toString()
toString
in class Object
public boolean isInvisible()
isInvisible
in class AbstractDataComponent
public DataComponentWrapper getWrapper()
public void setWrapper(DataComponentWrapper wrapperParam)
wrapperParam
- the wrapper to setpublic KiemProperty[] provideProperties()
provideProperties
in class AbstractDataComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |