Package cmion.level3.fatima
Class FAtiMARetainer
- java.lang.Object
-
- ion.Meta.Element
-
- cmion.architecture.CmionComponent
-
- cmion.level3.AgentMindConnector
-
- cmion.level3.fatima.FAtiMARetainer
-
- All Implemented Interfaces:
Migrating,MigrationAware
public class FAtiMARetainer extends AgentMindConnector implements Migrating, MigrationAware
in this class we pretend to be a fatima for the purpose of retaining the fatima state in a migration scenario. Specify it in your architecture configuration like so:
-
-
Field Summary
-
Fields inherited from class cmion.architecture.CmionComponent
architecture
-
-
Constructor Summary
Constructors Constructor Description FAtiMARetainer(IArchitecture architecture)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidarchitectureReady()informs the mind that the architecture is ready for the mind executing actionsvoidawakeMind()sends a command to the mind telling it to resume decision making and action executionjava.lang.StringgetMessageTag()This method returns a string that is used to identify the state that is encoded by the implementing class and to select the messages that will be delivered to it.booleanisMindSleeping()returns whether the mind is sleeping or notvoidonMigrationFailure()voidonMigrationIn()voidonMigrationOut()voidonMigrationSuccess()protected voidprocessActionCancellation(MindAction a)informs mind of the success of the cancellation of an executed actionprotected voidprocessActionFailure(MindAction a)Most of the methods do nothing, as there is no mind as-such present hereprotected voidprocessActionSuccess(MindAction a)informs mind of the success of a recently executed actionprotected voidprocessEntityAdded(java.lang.String entityName)informs the mind that a new entity (agent or object) has been added to the world modelprotected voidprocessEntityRemoved(java.lang.String entityName)informs the mind that an entity (agent or object) has been removed from the world modelprotected 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 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 voidprocessRawMessage(java.lang.String message)in this message a mind can parse raw messages containing specialised communication / perceptions / requestsprotected voidprocessRemoteAction(MindAction remoteAction)sends a remoteAction (an action that another agent/user has performed) to the mindvoidrestoreState(org.w3c.dom.Element message)This method parses the XML element provided and restores the state of the object.org.w3c.dom.ElementsaveState(org.w3c.dom.Document doc)This method encodes the current state of the object and other relevant information in an XML element in order to be migrated.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.level3.AgentMindConnector
cancel, newAction, onDestroy, registerHandlers
-
Methods inherited from class cmion.architecture.CmionComponent
getArchitecture, isConnected, raise
-
-
-
-
Constructor Detail
-
FAtiMARetainer
public FAtiMARetainer(IArchitecture architecture)
-
-
Method Detail
-
processActionFailure
protected void processActionFailure(MindAction a)
Most of the methods do nothing, as there is no mind as-such present here- Specified by:
processActionFailurein classAgentMindConnector
-
processActionSuccess
protected void processActionSuccess(MindAction a)
Description copied from class:AgentMindConnectorinforms mind of the success of a recently executed action- Specified by:
processActionSuccessin classAgentMindConnector
-
processActionCancellation
protected void processActionCancellation(MindAction a)
Description copied from class:AgentMindConnectorinforms mind of the success of the cancellation of an executed action- Specified by:
processActionCancellationin classAgentMindConnector
-
processRemoteAction
protected void processRemoteAction(MindAction remoteAction)
Description copied from class:AgentMindConnectorsends a remoteAction (an action that another agent/user has performed) to the mind- Specified by:
processRemoteActionin classAgentMindConnector
-
sendMindToSleep
public void sendMindToSleep()
Description copied from class:AgentMindConnectorsends 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- Specified by:
sendMindToSleepin classAgentMindConnector
-
processEntityAdded
protected void processEntityAdded(java.lang.String entityName)
Description copied from class:AgentMindConnectorinforms the mind that a new entity (agent or object) has been added to the world model- Specified by:
processEntityAddedin classAgentMindConnector
-
processEntityRemoved
protected void processEntityRemoved(java.lang.String entityName)
Description copied from class:AgentMindConnectorinforms the mind that an entity (agent or object) has been removed from the world model- Specified by:
processEntityRemovedin classAgentMindConnector
-
processPropertyChanged
protected void processPropertyChanged(java.lang.String entityName, java.lang.String propertyName, java.lang.String propertyValue, boolean persistent)Description copied from class:AgentMindConnectorinforms the mind that a property of an agent or object in the world model has changed- Specified by:
processPropertyChangedin classAgentMindConnector
-
processPropertyRemoved
protected void processPropertyRemoved(java.lang.String entityName, java.lang.String propertyName)Description copied from class:AgentMindConnectorinforms the mind that a property of an agent or object in the world model has been removed- Specified by:
processPropertyRemovedin classAgentMindConnector
-
processRawMessage
protected void processRawMessage(java.lang.String message)
Description copied from class:AgentMindConnectorin this message a mind can parse raw messages containing specialised communication / perceptions / requests- Specified by:
processRawMessagein classAgentMindConnector
-
architectureReady
protected void architectureReady()
Description copied from class:AgentMindConnectorinforms the mind that the architecture is ready for the mind executing actions- Specified by:
architectureReadyin classAgentMindConnector
-
getMessageTag
public java.lang.String getMessageTag()
Description copied from interface:MigratingThis method returns a string that is used to identify the state that is encoded by the implementing class and to select the messages that will be delivered to it.- Specified by:
getMessageTagin interfaceMigrating- Returns:
- the object signature.
-
onMigrationFailure
public void onMigrationFailure()
- Specified by:
onMigrationFailurein interfaceMigrationAware
-
onMigrationIn
public void onMigrationIn()
- Specified by:
onMigrationInin interfaceMigrationAware
-
onMigrationOut
public void onMigrationOut()
- Specified by:
onMigrationOutin interfaceMigrationAware
-
onMigrationSuccess
public void onMigrationSuccess()
- Specified by:
onMigrationSuccessin interfaceMigrationAware
-
restoreState
public void restoreState(org.w3c.dom.Element message)
Description copied from interface:MigratingThis method parses the XML element provided and restores the state of the object.- Specified by:
restoreStatein interfaceMigrating- Parameters:
message- An XML element that contains the state to be parsed
-
saveState
public org.w3c.dom.Element saveState(org.w3c.dom.Document doc)
Description copied from interface:MigratingThis method encodes the current state of the object and other relevant information in an XML element in order to be migrated.
-
isMindSleeping
public boolean isMindSleeping()
Description copied from class:AgentMindConnectorreturns whether the mind is sleeping or not- Specified by:
isMindSleepingin classAgentMindConnector
-
awakeMind
public void awakeMind()
Description copied from class:AgentMindConnectorsends a command to the mind telling it to resume decision making and action execution- Specified by:
awakeMindin classAgentMindConnector
-
-