Package cmion.level2.competencies
Class ExampleTCPCompetency
java.lang.Object
ion.Meta.Element
cmion.architecture.CmionComponent
cmion.level2.Competency
cmion.level2.RemoteCompetency
cmion.level2.RemoteTCPCompetency
cmion.level2.competencies.ExampleTCPCompetency
- All Implemented Interfaces:
Runnable
example of the implementation of a TCP remote competency, with comments
explaining how to define competencies, this is not actually doing anything serious
-
Field Summary
Fields inherited from class cmion.level2.RemoteTCPCompetency
portFields inherited from class cmion.level2.Competency
available, competencyName, competencyType, plan, runningFields inherited from class cmion.architecture.CmionComponent
architecture -
Constructor Summary
ConstructorsConstructorDescriptionExampleTCPCompetency(IArchitecture architecture) constructor, every competency, should if possible have a constructor that receives the Architecture as an argument -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprocessMessage(String message) we must also implement this method, it will be invoked, whenever we receive a message from the remote programbooleanthis competency is invoked directly (does not run in background)protected voidstartExecution(HashMap<String, String> parameters) we must implement this method.Methods inherited from class cmion.level2.RemoteTCPCompetency
initialize, sendMessageMethods inherited from class cmion.level2.RemoteCompetency
competencyCode, returnFailure, returnSuccessMethods 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
-
ExampleTCPCompetency
constructor, every competency, should if possible have a constructor that receives the Architecture as an argument
-
-
Method Details
-
runsInBackground
public boolean runsInBackground()this competency is invoked directly (does not run in background)- Specified by:
runsInBackgroundin classCompetency
-
startExecution
we must implement this method. It will be invoked whenever the competency is started.- Specified by:
startExecutionin classRemoteCompetency
-
processMessage
we must also implement this method, it will be invoked, whenever we receive a message from the remote program- Specified by:
processMessagein classRemoteCompetency
-