Package cmion.level3
Class AgentMindConnector
- java.lang.Object
-
- ion.Meta.Element
-
- cmion.architecture.CmionComponent
-
- cmion.level3.AgentMindConnector
-
- Direct Known Subclasses:
FAtiMAConnector,FAtiMARetainer,SuperSimpleMigratingByInviteMindConnector,SuperSimpleMigratingMindConnector,SuperSimpleMindConnector
public abstract class AgentMindConnector extends CmionComponent
This abstract class describes the functionality an agent mind interface should provide. A concrete implementation of an AgentMind connector has to implement the abstract methods of this class. The FAtiMA connector subclasses this class but other subclasses for different agent minds are possible. The class SuperSimpleMind exemplifies how another mind could be integrated.
-
-
Field Summary
-
Fields inherited from class cmion.architecture.CmionComponent
architecture
-
-
Constructor Summary
Constructors Constructor Description AgentMindConnector(IArchitecture architecture)create a new Agent Mind Connector
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidarchitectureReady()informs the mind that the architecture is ready for the mind executing actionsabstract voidawakeMind()sends a command to the mind telling it to resume decision making and action executionvoidcancel(MindAction mindAction)cancels a currently executing mind action (if such an action is currently running)abstract booleanisMindSleeping()returns whether the mind is sleeping or notvoidnewAction(MindAction mindAction)call this if the mind decides to execute a new action, this will schedule an ION request with the competency manager to execute the actionvoidonDestroy()abstract method overridden from ION.meta.elementprotected abstract voidprocessActionCancellation(MindAction a)informs mind of the success of the cancellation of an executed actionprotected abstract voidprocessActionFailure(MindAction a)informs mind of the failure of a recently executed actionprotected abstract voidprocessActionSuccess(MindAction a)informs mind of the success of a recently executed actionprotected abstract voidprocessEntityAdded(java.lang.String entityName)informs the mind that a new entity (agent or object) has been added to the world modelprotected abstract voidprocessEntityRemoved(java.lang.String entityName)informs the mind that an entity (agent or object) has been removed from the world modelprotected abstract voidprocessPropertyChanged(java.lang.String entityName, java.lang.String propertyName, java.lang.String propertyValue, boolean persistent)informs the mind that a property of an agent or object in the world model has changedprotected abstract voidprocessPropertyRemoved(java.lang.String entityName, java.lang.String propertyName)informs the mind that a property of an agent or object in the world model has been removedprotected abstract voidprocessRawMessage(java.lang.String message)in this message a mind can parse raw messages containing specialised communication / perceptions / requestsprotected abstract voidprocessRemoteAction(MindAction remoteAction)sends a remoteAction (an action that another agent/user has performed) to the mindvoidregisterHandlers()in this method the mind connector registers its request and event handlers with IONabstract voidsendMindToSleep()sends a command to the connected mind, making it pause any decision making processes and action execution, while the mind is paused it should not send any action-
Methods inherited from class cmion.architecture.CmionComponent
getArchitecture, isConnected, raise
-
-
-
-
Constructor Detail
-
AgentMindConnector
public AgentMindConnector(IArchitecture architecture)
create a new Agent Mind Connector
-
-
Method Detail
-
sendMindToSleep
public abstract void sendMindToSleep()
sends a command to the connected mind, making it pause any decision making processes and action execution, while the mind is paused it should not send any action
-
isMindSleeping
public abstract boolean isMindSleeping()
returns whether the mind is sleeping or not
-
awakeMind
public abstract void awakeMind()
sends a command to the mind telling it to resume decision making and action execution
-
processRemoteAction
protected abstract void processRemoteAction(MindAction remoteAction)
sends a remoteAction (an action that another agent/user has performed) to the mind
-
processActionSuccess
protected abstract void processActionSuccess(MindAction a)
informs mind of the success of a recently executed action
-
processActionFailure
protected abstract void processActionFailure(MindAction a)
informs mind of the failure of a recently executed action
-
processActionCancellation
protected abstract void processActionCancellation(MindAction a)
informs mind of the success of the cancellation of an executed action
-
processEntityAdded
protected abstract void processEntityAdded(java.lang.String entityName)
informs the mind that a new entity (agent or object) has been added to the world model
-
processEntityRemoved
protected abstract void processEntityRemoved(java.lang.String entityName)
informs the mind that an entity (agent or object) has been removed from the world model
-
processPropertyChanged
protected abstract void processPropertyChanged(java.lang.String entityName, java.lang.String propertyName, java.lang.String propertyValue, boolean persistent)informs the mind that a property of an agent or object in the world model has changed
-
processPropertyRemoved
protected abstract void processPropertyRemoved(java.lang.String entityName, java.lang.String propertyName)informs the mind that a property of an agent or object in the world model has been removed
-
processRawMessage
protected abstract void processRawMessage(java.lang.String message)
in this message a mind can parse raw messages containing specialised communication / perceptions / requests
-
architectureReady
protected abstract void architectureReady()
informs the mind that the architecture is ready for the mind executing actions
-
registerHandlers
public final void registerHandlers()
in this method the mind connector registers its request and event handlers with ION- Specified by:
registerHandlersin classCmionComponent
-
newAction
public final void newAction(MindAction mindAction)
call this if the mind decides to execute a new action, this will schedule an ION request with the competency manager to execute the action
-
cancel
public final void cancel(MindAction mindAction)
cancels a currently executing mind action (if such an action is currently running)
-
onDestroy
public void onDestroy()
abstract method overridden from ION.meta.element- Overrides:
onDestroyin classCmionComponent
-
-