Package cmion.level2.competencies
Class ExampleCompetency
java.lang.Object
ion.Meta.Element
cmion.architecture.CmionComponent
cmion.level2.Competency
cmion.level2.competencies.ExampleCompetency
- All Implemented Interfaces:
Runnable
example of the implementation of a competency, with comments explaining how
to define competencies, this is not actually doing anything serious
-
Field Summary
Fields inherited from class cmion.level2.Competency
available, competencyName, competencyType, plan, runningFields inherited from class cmion.architecture.CmionComponent
architecture -
Constructor Summary
ConstructorsConstructorDescriptionExampleCompetency(IArchitecture architecture) constructor, every competency, should if possible have a constructor that receives the Architecture as an argument -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancompetencyCode(HashMap<String, String> parameters) the custom code of the competence, this is already running in a threadvoidperform initialisations in this methodbooleanthis competency is invoked directly (does not run in background)Methods inherited from class cmion.level2.Competency
cancel, getCompetencyName, getCompetencyType, isAvailable, isRunning, registerHandlers, requestStartCompetency, run, setAdditionalDataMethods inherited from class cmion.architecture.CmionComponent
getArchitecture, isConnected, onDestroy, raiseMethods inherited from class ion.Meta.Element
destroy, getEventFilters, getEventHandlers, getRequestFilters, getRequestHandlers, getSimulation, getUID, schedule, wasDestroyed
-
Constructor Details
-
ExampleCompetency
constructor, every competency, should if possible have a constructor that receives the Architecture as an argument
-
-
Method Details
-
initialize
public void initialize()perform initialisations in this method- Specified by:
initializein classCompetency
-
runsInBackground
public boolean runsInBackground()this competency is invoked directly (does not run in background)- Specified by:
runsInBackgroundin classCompetency
-
competencyCode
the custom code of the competence, this is already running in a thread- Specified by:
competencyCodein classCompetency- Parameters:
parameters- a map including running parameters and their values- Returns:
- the return value of this method should indicate, whether the competency execution was a success (true) or failure (false)
-