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:
java.lang.Runnable
public class ExampleTCPCompetency extends RemoteTCPCompetency
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
port
-
Fields inherited from class cmion.level2.Competency
available, competencyName, competencyType, plan, running
-
Fields inherited from class cmion.architecture.CmionComponent
architecture
-
-
Constructor Summary
Constructors Constructor Description ExampleTCPCompetency(IArchitecture architecture)constructor, every competency, should if possible have a constructor that receives the Architecture as an argument
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidprocessMessage(java.lang.String message)we must also implement this method, it will be invoked, whenever we receive a message from the remote programbooleanrunsInBackground()this competency is invoked directly (does not run in background)protected voidstartExecution(java.util.HashMap<java.lang.String,java.lang.String> parameters)we must implement this method.-
Methods inherited from class cmion.level2.RemoteTCPCompetency
initialize, sendMessage
-
Methods inherited from class cmion.level2.RemoteCompetency
competencyCode, returnFailure, returnSuccess
-
Methods inherited from class cmion.level2.Competency
cancel, getCompetencyName, getCompetencyType, isAvailable, isRunning, registerHandlers, requestStartCompetency, run, setAdditionalData
-
Methods inherited from class cmion.architecture.CmionComponent
getArchitecture, isConnected, onDestroy, raise
-
-
-
-
Constructor Detail
-
ExampleTCPCompetency
public ExampleTCPCompetency(IArchitecture architecture)
constructor, every competency, should if possible have a constructor that receives the Architecture as an argument
-
-
Method Detail
-
runsInBackground
public boolean runsInBackground()
this competency is invoked directly (does not run in background)- Specified by:
runsInBackgroundin classCompetency
-
startExecution
protected void startExecution(java.util.HashMap<java.lang.String,java.lang.String> parameters)
we must implement this method. It will be invoked whenever the competency is started.- Specified by:
startExecutionin classRemoteCompetency
-
processMessage
protected void processMessage(java.lang.String message)
we must also implement this method, it will be invoked, whenever we receive a message from the remote program- Specified by:
processMessagein classRemoteCompetency
-
-