Migrating, MigrationAwarepublic class SuperSimpleMigratingMindConnector extends AgentMindConnector implements Migrating, MigrationAware
architecture| Constructor | Description |
|---|---|
SuperSimpleMigratingMindConnector(IArchitecture architecture) |
creates a new connector for a SuperSimpleMind
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
architectureReady() |
informs the mind that the architecture is ready for the mind executing actions
|
void |
awakeMind() |
sends a command to the mind telling it to resume decision making and action execution
|
java.lang.String |
getMessageTag() |
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.
|
boolean |
isMindSleeping() |
returns whether the mind is sleeping or not
|
void |
onMigrationFailure() |
|
void |
onMigrationIn() |
|
void |
onMigrationOut() |
|
void |
onMigrationSuccess() |
|
protected void |
processActionCancellation(MindAction a) |
informs mind of the success of the cancellation of an executed action
|
void |
processActionFailure(MindAction a) |
informs mind of the failure of a recently executed action
|
void |
processActionSuccess(MindAction a) |
informs mind of the success of a recently executed action
|
protected void |
processEntityAdded(java.lang.String entityName) |
informs the mind that a new entity (agent or object) has been added to the world model
|
protected void |
processEntityRemoved(java.lang.String entityName) |
informs the mind that an entity (agent or object) has been removed from the world model
|
protected 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
|
protected 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
|
protected void |
processRawMessage(java.lang.String message) |
in this message a mind can parse raw messages containing specialised communication / perceptions / requests
|
void |
processRemoteAction(MindAction remoteAction) |
sends a remoteAction (an action that another agent/user has performed) to the mind
|
void |
restoreState(org.w3c.dom.Element message) |
This method parses the XML element provided and restores the
state of the object.
|
org.w3c.dom.Element |
saveState(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.
|
void |
sendMindToSleep() |
pause the mind
|
cancel, newAction, onDestroy, registerHandlersgetArchitecture, isConnected, raisepublic SuperSimpleMigratingMindConnector(IArchitecture architecture)
public void awakeMind()
AgentMindConnectorawakeMind in class AgentMindConnectorpublic boolean isMindSleeping()
AgentMindConnectorisMindSleeping in class AgentMindConnectorpublic void processActionFailure(MindAction a)
AgentMindConnectorprocessActionFailure in class AgentMindConnectorpublic void processActionSuccess(MindAction a)
AgentMindConnectorprocessActionSuccess in class AgentMindConnectorprotected void processActionCancellation(MindAction a)
AgentMindConnectorprocessActionCancellation in class AgentMindConnectorpublic void sendMindToSleep()
sendMindToSleep in class AgentMindConnectorpublic void processRemoteAction(MindAction remoteAction)
AgentMindConnectorprocessRemoteAction in class AgentMindConnectorprotected void processEntityAdded(java.lang.String entityName)
AgentMindConnectorprocessEntityAdded in class AgentMindConnectorprotected void processEntityRemoved(java.lang.String entityName)
AgentMindConnectorprocessEntityRemoved in class AgentMindConnectorprotected void processPropertyChanged(java.lang.String entityName,
java.lang.String propertyName,
java.lang.String propertyValue,
boolean persistent)
AgentMindConnectorprocessPropertyChanged in class AgentMindConnectorprotected void processPropertyRemoved(java.lang.String entityName,
java.lang.String propertyName)
AgentMindConnectorprocessPropertyRemoved in class AgentMindConnectorprotected void architectureReady()
AgentMindConnectorarchitectureReady in class AgentMindConnectorpublic java.lang.String getMessageTag()
MigratinggetMessageTag in interface Migratingpublic void restoreState(org.w3c.dom.Element message)
MigratingrestoreState in interface Migratingmessage - An XML element that contains the state to be parsedpublic org.w3c.dom.Element saveState(org.w3c.dom.Document doc)
Migratingpublic void onMigrationFailure()
onMigrationFailure in interface MigrationAwarepublic void onMigrationIn()
onMigrationIn in interface MigrationAwarepublic void onMigrationOut()
onMigrationOut in interface MigrationAwarepublic void onMigrationSuccess()
onMigrationSuccess in interface MigrationAwareprotected void processRawMessage(java.lang.String message)
AgentMindConnectorprocessRawMessage in class AgentMindConnector