|
||||||||||
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
public abstract class AbstractDataComponent
The DataComponent class implements the basic behavior of a data observer and/or data producer component. Implemented components may want to override some of the here provided methods.
Field Summary | |
---|---|
static int |
MASTER_CMD_MACROSTEP
The Constant to imitate a user macro step command. |
static int |
MASTER_CMD_PAUSE
The Constant to imitate a user pause command. |
static int |
MASTER_CMD_RUN
The Constant to imitate a user run command. |
static int |
MASTER_CMD_STEP
The Constant to imitate a user step command. |
static int |
MASTER_CMD_STEPBACK
The Constant to imitate a user step command. |
static int |
MASTER_CMD_STOP
The Constant to imitate a user stop command. |
Constructor Summary | |
---|---|
AbstractDataComponent()
Constructor initializes the properties with the provideProperties() provideProperties
method that may be overridden by the component. |
Method Summary | |
---|---|
void |
checkProperties(KiemProperty[] propertiesParam)
This method is intended to check if the properties are set correctly. |
void |
finalize()
finalize() is a destructor of the DataComponent that is called by the execution manager before the DataComponent instance is removed from the list. |
IConfigurationElement |
getConfigurationElement()
Gets the configuration element. |
String |
getCurrentComponentID()
|
String |
getDataComponentId()
Gets the String representation id of a DataComponent. |
String |
getName()
Gets the name of the component which is defined in the extension point. |
String |
getPluginId()
Gets the component's plug-in ID. |
KiemProperty[] |
getProperties()
Returns the properties associated with this component. |
Shell |
getShell()
Getter for the main shell of the active workbench. |
boolean |
isDeltaObserver()
Checks if component is a delta observer. |
boolean |
isHistoryObserver()
Flags that this component can handle past, already computed history values. |
boolean |
isHistoryStep()
Checks if the current step is a history step. |
boolean |
isInvisible()
If the component doesn't want to appear in the scheduling list, it may set this flag to true. |
boolean |
isMacroStepDone()
Checks if is a macro step is done. |
boolean |
isMaster()
Override this, if this DataComponent is a master. If it returns true then 1. |
boolean |
isMasterImplementingGUI()
Override this if the DataComponents implements the GUI buttons by itself. |
boolean |
isMultiInstantiable()
Flag that this component can be run multible times in different threads. |
void |
masterCommand(int command)
If this is component is a master it can control the execution using this method. |
int |
masterGetAimedStepDuration()
If this component is a master it can get the aimed step duration. |
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. |
boolean |
masterIsPaused()
If this component is a master it can detect whether the execution is currently paused. |
boolean |
masterIsRunning()
If this component is a master it can detect whether the execution is currently running. |
void |
masterSetAimedStepDuration(int aimedStepDuration)
If this component is a master it can set the aimed step duration. |
void |
masterSetKIEMInstance(KiemPlugin kIEMInstanceParam)
This method is called from the ExecutionManager only iff isMaster() returns true! ATTENTION: At most ONE DataComponent can be a Master! This method SHOULD NOT be overridden! |
void |
notifyEvent(KiemEvent event)
This is the basic notify method that is called by KIEM whenever an event occurs for which this DataComponent is registered (see provideEventOfInterest() ). |
KiemEvent |
provideEventOfInterest()
Return a KiemEvent type (integer value) that represents a number of events this component wants to listen to. A KiemEvent can be a combination of several events. |
String[] |
provideFilterKeys()
If this DataComponent implements an observer, provide some key's of interest. |
KiemProperty[] |
provideProperties()
Provide properties for this component. |
void |
setConfigurationElemenet(IConfigurationElement configEleParam)
Sets the configuration element. |
void |
setCurrentComponentID(String currentComponentIDParam)
|
void |
setHistoryStep(boolean historyStepParam)
Sets the history step flag. |
void |
setInitializationData(IConfigurationElement config,
String propertyName,
Object data)
|
void |
setProperties(KiemProperty[] propertiesParam)
Sets the properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.cau.cs.kieler.sim.kiem.IDataComponent |
---|
initialize, isObserver, isProducer, wrapup |
Field Detail |
---|
public static final int MASTER_CMD_RUN
public static final int MASTER_CMD_PAUSE
public static final int MASTER_CMD_STOP
public static final int MASTER_CMD_STEP
public static final int MASTER_CMD_MACROSTEP
public static final int MASTER_CMD_STEPBACK
Constructor Detail |
---|
public AbstractDataComponent()
provideProperties()
provideProperties
method that may be overridden by the component. It sets the properties to null in the default
case to indicate that the DataComponent has no properties.
Method Detail |
---|
public Shell getShell()
public String getDataComponentId()
public final void setProperties(KiemProperty[] propertiesParam)
propertiesParam
- the new KiemProperty[] arraypublic final void setConfigurationElemenet(IConfigurationElement configEleParam)
configEleParam
- the new configuration elementpublic final IConfigurationElement getConfigurationElement()
public final String getPluginId()
public final void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException
setInitializationData
in interface IExecutableExtension
CoreException
public final String getName()
public boolean isMultiInstantiable()
public boolean isInvisible()
public String[] provideFilterKeys()
public final KiemProperty[] getProperties()
provideProperties()
.
public KiemProperty[] provideProperties()
public void checkProperties(KiemProperty[] propertiesParam) throws KiemPropertyException
propertiesParam
- the properties with the current user settings
KiemPropertyException
- if a property prevents the execution of this DataComponent this error should be
thrownpublic boolean isHistoryObserver()
public final void setHistoryStep(boolean historyStepParam)
historyStepParam
- the flag to setpublic final boolean isHistoryStep()
public boolean isDeltaObserver()
public boolean isMacroStepDone()
public boolean isMaster()
public boolean isMasterImplementingGUI()
public final void masterSetAimedStepDuration(int aimedStepDuration) throws KiemMasterException
aimedStepDuration
- the aimed step duration
KiemMasterException
- a KiemMasterExceptionpublic final int masterGetAimedStepDuration() throws KiemMasterException
KiemMasterException
- a KiemMasterExceptionpublic final void masterCommand(int command) throws KiemMasterException
command
- the master command to process
KiemMasterException
- a KiemMasterExceptionpublic final boolean masterIsPaused() throws KiemMasterException
KiemMasterException
- a KiemMasterExceptionpublic final boolean masterIsRunning() throws KiemMasterException
KiemMasterException
- a KiemMasterExceptionpublic final void masterSetKIEMInstance(KiemPlugin kIEMInstanceParam)
kIEMInstanceParam
- the KIEM instancepublic void masterGUI(int command)
command
- the commandpublic boolean masterGUIisEnabled(int command)
command
- the command
public void finalize()
finalize
in class Object
public KiemEvent provideEventOfInterest()
public void notifyEvent(KiemEvent event)
provideEventOfInterest()
).
event
- the KiemEvent with additional attached information, depending on the specific
eventpublic void setCurrentComponentID(String currentComponentIDParam)
currentComponentIDParam
- the currentComponentID to setpublic String getCurrentComponentID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |