Package cmion.level3
Class CompetencyManager
- java.lang.Object
-
- ion.Meta.Element
-
- cmion.architecture.CmionComponent
-
- cmion.level3.CompetencyManager
-
public class CompetencyManager extends CmionComponent
the competency manager receives actions from the mind for execution and decomposes them into a plan of competencies for execution
-
-
Field Summary
-
Fields inherited from class cmion.architecture.CmionComponent
architecture
-
-
Constructor Summary
Constructors Constructor Description CompetencyManager(IArchitecture architecture, java.lang.String competencyManagerRulesFileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcancelActionFromMind(MindAction a)method that is called by the event handler whenever the mind initiates a new actionprotected CompetencyManagerRulefindMatch(MindAction a, java.util.ArrayList<CompetencyManagerRule> rulesToIgnore)find a rule from the rule base that maps the specified Mind Action to a competency execution planprotected java.io.InputStreamopenRulesFile(java.lang.String competencyManagerRulesFileName)protected voidreceiveActionFromMind(MindAction a)method that is called by the event handler whenever the mind initiates a new actionvoidregisterHandlers()in here the competency manager registers its request and event handlers with ION-
Methods inherited from class cmion.architecture.CmionComponent
getArchitecture, isConnected, onDestroy, raise
-
-
-
-
Constructor Detail
-
CompetencyManager
public CompetencyManager(IArchitecture architecture, java.lang.String competencyManagerRulesFileName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
receiveActionFromMind
protected void receiveActionFromMind(MindAction a)
method that is called by the event handler whenever the mind initiates a new action
-
cancelActionFromMind
protected void cancelActionFromMind(MindAction a)
method that is called by the event handler whenever the mind initiates a new action
-
findMatch
protected CompetencyManagerRule findMatch(MindAction a, java.util.ArrayList<CompetencyManagerRule> rulesToIgnore)
find a rule from the rule base that maps the specified Mind Action to a competency execution plan- Parameters:
a- the mind action that we are checking matches forrulesToIgnore- the rules that should not be matched with- Returns:
- a rule that matches or null if no match could be found
-
registerHandlers
public final void registerHandlers()
in here the competency manager registers its request and event handlers with ION- Specified by:
registerHandlersin classCmionComponent
-
openRulesFile
protected java.io.InputStream openRulesFile(java.lang.String competencyManagerRulesFileName) throws java.lang.Exception- Throws:
java.lang.Exception
-
-