|
||||||||||
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.DataComponentWrapper
public class DataComponentWrapper
The Class DataComponentWrapper. Is a wrapper for the
AbstractDataComponent
class. It should enrich the
above class with information that is only needed for instances in the running execution manager
and its view. For example whether a DataComponent instance is enabled or disabled or the current
pool index for delta observer DataComponents.
Constructor Summary | |
---|---|
DataComponentWrapper(AbstractDataComponent componentParam)
Instantiates a new DataComponentWrapper wrapping a DataComponent. |
Method Summary | |
---|---|
void |
addPoolIndex(long poolIndex,
long stepCounter)
Adds a pool index for a given step. |
void |
checkProperties(KiemProperty[] propertiesParam)
Let the DataComponent check its properties. |
String |
getComponentId()
Gets a component id to identify DataComponents during loading because the DataComponents itself do not get serialized. |
AbstractDataComponent |
getDataComponent()
Gets the contained DataComponent. |
long |
getDeltaIndex()
Gets the delta index. |
String |
getName()
Gets the name of the DataComponent. |
long |
getPoolIndex(long stepCounter)
Gets the pool index of a specific step. |
KiemProperty[] |
getProperties()
Gets the KiemProperties of this DataComponent. |
boolean |
isDeltaObserver()
Checks whether the DataComponent is a delta observer. |
boolean |
isEnabled()
Checks whether the DataComponent is enabled or disabled. |
boolean |
isHistoryObserver()
Checks whether the DataComponent is a history observer. |
boolean |
isHistoryStep()
Checks if the current step is a history step. |
boolean |
isJSON()
Checks whether this DataComponent is a JSON component that is able to handle JSONObjects of the following Java implementation "http://www.json.org/java". |
boolean |
isMacroStepDone()
Checks if is a macro step is finished. |
boolean |
isMaster()
Checks whether this DataComponent implements a master. |
boolean |
isMasterImplementingGUI()
Checks whether the master is implementing GUI buttons. |
boolean |
isObserver()
Checks whether the DataComponent is an observer. |
boolean |
isObserverOnly()
Checks whether the DataComponent is a pure observer only. |
boolean |
isProducer()
Checks whether the DataComponent is an producer. |
boolean |
isProducerObserver()
Checks whether the DataComponent is a producer AND an observer at the same time. |
boolean |
isProducerOnly()
Checks whether the DataComponent is a pure producer only. |
boolean |
isUnfolded()
Checks whether the properties of this DataComponent are unfolded. |
void |
masterGUI(int command)
If this is component is a master and implements the GUI it must react to user button hits. The command can be either: MASTER_CMD_STEP for the step button MASTER_CMD_MACROSTEP for the macro step button MASTER_CMD_RUN for the run button MASTER_CMD_PAUSE for the pause button MASTER_CMD_STOP for the stop button MASTER_CMD_STEPBACK for the back step button |
boolean |
masterGUIisEnabled(int command)
If this is component is a master and implements the GUI it must tell KIEM when user buttons are enabled/disabled. |
void |
noop()
Noop does nothing. |
String[] |
provideFilterKeys()
Gets the filter keys if the DataComponent provides any or null if it is an observer and wants ALL complete data. |
JSONObject |
provideInitialVariables()
This method is implemented by the DataComponent if it provides a JSONObject of initial variables. |
void |
resetPoolIndices()
Reset pool indices. |
void |
setDeltaIndex(long deltaIndexParam)
Sets the delta index. |
void |
setEnabled(boolean enabledParam)
Sets the enabled flag of this DataComponent. |
void |
setHistoryStep(boolean historyStep)
Flag the current step as a history step. |
void |
setInitialVariables(JSONObject globalInitialVariables)
Sets the global initial variables. |
void |
setProperties(KiemProperty[] propertiesParam)
Sets the properties for the DataComponent and this DataComponentWrapper instance. |
void |
setUnfolded(boolean unfoldedParam)
Sets whether the properties of this DataComponent are unfolded. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataComponentWrapper(AbstractDataComponent componentParam)
componentParam
- the contained DataComponentMethod Detail |
---|
public String getComponentId()
public void setProperties(KiemProperty[] propertiesParam)
propertiesParam
- the new propertiespublic boolean isJSON()
public boolean isUnfolded()
public void setUnfolded(boolean unfoldedParam)
unfoldedParam
- set to true if they are unfoldedpublic AbstractDataComponent getDataComponent()
public boolean isEnabled()
public void setEnabled(boolean enabledParam)
enabledParam
- true, if the DataComponent is enabledpublic void resetPoolIndices()
public void addPoolIndex(long poolIndex, long stepCounter)
poolIndex
- the pool index to addstepCounter
- the related step counterpublic long getPoolIndex(long stepCounter)
stepCounter
- the step counter to find the related pool index
public long getDeltaIndex()
public void setDeltaIndex(long deltaIndexParam)
deltaIndexParam
- the new delta indexpublic boolean isProducerObserver()
public boolean isProducerOnly()
public boolean isObserverOnly()
public boolean isProducer()
IDataComponent.isProducer()
public boolean isObserver()
IDataComponent.isObserver()
public String getName()
AbstractDataComponent.getName()
public String[] provideFilterKeys()
AbstractDataComponent.provideFilterKeys()
public JSONObject provideInitialVariables() throws KiemInitializationException
KiemInitializationException
- the KIEM initialization exceptionJSONObjectDataComponent.provideInitialVariables()
,
JSONStringDataComponent.provideInitialVariables()
public KiemProperty[] getProperties()
AbstractDataComponent.getProperties()
public boolean isDeltaObserver()
AbstractDataComponent.isDeltaObserver()
public boolean isHistoryObserver()
AbstractDataComponent.isHistoryObserver()
public boolean isHistoryStep()
AbstractDataComponent.isHistoryStep()
public void setHistoryStep(boolean historyStep)
historyStep
- true, if the step is a history stepAbstractDataComponent.setHistoryStep(boolean)
public boolean isMaster()
AbstractDataComponent.isMaster()
public boolean isMacroStepDone()
AbstractDataComponent.isMacroStepDone()
public void checkProperties(KiemProperty[] propertiesParam) throws KiemPropertyException
propertiesParam
- the KiemProperties of this component
KiemPropertyException
- an Exception in case of an errorAbstractDataComponent.checkProperties(KiemProperty[])
public void setInitialVariables(JSONObject globalInitialVariables)
globalInitialVariables
- all interface variable keysJSONObjectDataComponent.setInitialVariables(JSONObject)
,
JSONStringDataComponent.setInitialVariables(String)
public boolean isMasterImplementingGUI()
AbstractDataComponent.isMasterImplementingGUI()
public void masterGUI(int command)
command
- the commandpublic boolean masterGUIisEnabled(int command)
command
- the command
public void noop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |