Package FAtiMA.Core.sensorEffector
Class IONRemoteAgent
- java.lang.Object
-
- java.lang.Thread
-
- FAtiMA.Core.util.parsers.SocketListener
-
- FAtiMA.Core.sensorEffector.RemoteAgent
-
- FAtiMA.Core.sensorEffector.IONRemoteAgent
-
- All Implemented Interfaces:
java.lang.Runnable
public class IONRemoteAgent extends RemoteAgent
Connection to the ION Framework's virtual world as a RemoteAgent. Implements the architecture Sensors and Effectors- Author:
- Joao Dias
-
-
Field Summary
-
Fields inherited from class FAtiMA.Core.sensorEffector.RemoteAgent
_actions, _agent, _canAct, _currentAction, _lookAtList, _processActionStrategy, _running, _userName, ACTION_FAILED, ACTION_FINISHED, ACTION_STARTED, ADVANCE_TIME, AGENTS, CANCEL_ACTION, CMD, ENTITY_ADDED, ENTITY_REMOVED, GET_STATE, IDENTIFY_USER, LOOK_AT, PROPERTY_CHANGED, PROPERTY_REMOVED, RESUME_TIME, SET_STATE, SHUTDOWN, STOP_TIME, USER_SPEECH
-
Fields inherited from class FAtiMA.Core.util.parsers.SocketListener
maxSize, socket, stopped
-
-
Constructor Summary
Constructors Constructor Description IONRemoteAgent(java.lang.String host, int port, AgentCore agent)Creates the IONRemoteAgent which tries to connect to the ION Framework
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidActionFailedPerception(java.lang.String perc)protected voidActionFinishedPerception(java.lang.String perc)protected voidActionStartedPerception(java.lang.String perc)java.lang.StringgetInitializationMessage(java.util.Map<java.lang.String,java.lang.String> arguments)voidhandleSocketException()protected voidPropertyChangedPerception(java.lang.String perc)protected voidPropertyRemovedPerception(java.lang.String perc)voidReportInternalPropertyChange(java.lang.String agentName, Name property, java.lang.Object value)protected booleanSendAction(RemoteAction ra)protected voidsendCancelActionMsg(RemoteAction ra)protected voidUserSpeechPerception(java.lang.String perc)-
Methods inherited from class FAtiMA.Core.sensorEffector.RemoteAgent
AddAction, AdvanceTimePerception, AgentsPerception, cancelAction, Clear, CmdPerception, EntityAddedPerception, EntityRemovedPerception, ExecuteNextAction, ExpressEmotion, FinishedExecuting, IdentifyUserPerception, isRunning, isShutDown, LoadState, LookAtPerception, processMessage, ReportInternalState, ResumeTimePerception, SaveState, Send, SendEmotionalState, setProcessActionStrategy, ShutDown, ShutDownPerception, StartAction, StopTimePerception, waitForServerAck
-
Methods inherited from class FAtiMA.Core.util.parsers.SocketListener
close, initializeSocket, isStopped, run
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
IONRemoteAgent
public IONRemoteAgent(java.lang.String host, int port, AgentCore agent) throws java.net.UnknownHostException, java.io.IOExceptionCreates the IONRemoteAgent which tries to connect to the ION Framework- Parameters:
host- - the host where the virtual world is runningport- - the socket port where the agent should try to connectagent- - a reference to the agent that needs this remote connection- Throws:
java.net.UnknownHostException- - thrown if the agent cannot connect to the serverjava.io.IOException- - thrown if there are problems reading or writting to the connection socket
-
-
Method Detail
-
getInitializationMessage
public java.lang.String getInitializationMessage(java.util.Map<java.lang.String,java.lang.String> arguments)
- Specified by:
getInitializationMessagein classRemoteAgent
-
SendAction
protected boolean SendAction(RemoteAction ra)
- Specified by:
SendActionin classRemoteAgent
-
sendCancelActionMsg
protected void sendCancelActionMsg(RemoteAction ra)
- Specified by:
sendCancelActionMsgin classRemoteAgent
-
ReportInternalPropertyChange
public void ReportInternalPropertyChange(java.lang.String agentName, Name property, java.lang.Object value)- Specified by:
ReportInternalPropertyChangein classRemoteAgent
-
PropertyChangedPerception
protected void PropertyChangedPerception(java.lang.String perc)
- Specified by:
PropertyChangedPerceptionin classRemoteAgent
-
PropertyRemovedPerception
protected void PropertyRemovedPerception(java.lang.String perc)
- Specified by:
PropertyRemovedPerceptionin classRemoteAgent
-
UserSpeechPerception
protected void UserSpeechPerception(java.lang.String perc)
- Specified by:
UserSpeechPerceptionin classRemoteAgent
-
ActionStartedPerception
protected void ActionStartedPerception(java.lang.String perc)
- Specified by:
ActionStartedPerceptionin classRemoteAgent
-
ActionFinishedPerception
protected void ActionFinishedPerception(java.lang.String perc)
- Specified by:
ActionFinishedPerceptionin classRemoteAgent
-
ActionFailedPerception
protected void ActionFailedPerception(java.lang.String perc)
- Specified by:
ActionFailedPerceptionin classRemoteAgent
-
handleSocketException
public void handleSocketException()
- Specified by:
handleSocketExceptionin classSocketListener
-
-