java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
edu.mit.media.hive.agent.AgentImpl
edu.mit.media.hive.agent.EventReceivingAgentImpl
edu.mit.media.hive.agent.EventTransceivingAgentImpl
edu.mit.media.hive.agent.filter.EventNumberTranslatingAgentImpl
- All Implemented Interfaces:
- edu.mit.media.hive.agent.Agent, edu.mit.media.hive.rdf.Describable, java.util.EventListener, edu.mit.media.hive.agent.EventReceivingAgent, edu.mit.media.hive.agent.EventSendingAgent, edu.mit.media.hive.agent.EventSendingErrorListener, edu.mit.media.hive.agent.EventTransceivingAgent, java.rmi.Remote, edu.mit.media.hive.event.RemoteEventListener, java.io.Serializable
- public class EventNumberTranslatingAgentImpl
- extends edu.mit.media.hive.agent.EventTransceivingAgentImpl
Agent that turns generic events into numbers. When this agent
receives an event, it rebroadcasts it to its listeners with an
Integer. The Integer sent is a property of the agent.
- Version:
- $Revision: 2.0 $
Fields inherited from class edu.mit.media.hive.agent.AgentImpl |
AGENTKILLED, AGENTMOVED, agentThreadGroup, commandList, commands, description, icon, iconName, myCell, readyFlag, stopCode, timeToStop |
Methods inherited from class edu.mit.media.hive.agent.AgentImpl |
addActionCommand, blockUntilReady, configure, doBehaviour, doLocalCleanup, getActionCommands, getCell, getComponentManagerShadow, getDescription, getIcon, getIconName, getName, getThreadGroup, invokeActionCommand, isReady, isTimeToStop, loadIcon, moveTo, onDying, onMoving, setCell, setDescription, setIconName, setIsReady, setThreadGroup, setTimeToStop, waitUntilDeath |
Methods inherited from interface edu.mit.media.hive.agent.Agent |
blockUntilReady, configure, connectTo, diePlease, disconnectFrom, disconnectFromAll, getActionCommands, getCell, getDescription, getIcon, getName, invokeActionCommand, isReady |
valueToSend
public int valueToSend
valueObject
protected java.lang.Integer valueObject
EventNumberTranslatingAgentImpl
public EventNumberTranslatingAgentImpl()
throws java.rmi.RemoteException
notify
public void notify(edu.mit.media.hive.event.HiveEvent event)
- When an event is received, send a number object.
doBehavior
public void doBehavior()
- Description copied from class:
edu.mit.media.hive.agent.AgentImpl
- Do the basic behavior for an agent, the agent's main loop.
Override this to provide your particular agent's behavior.
Note: the doBehavior loop should not exit. Please call
waitUntilDeath() at the end of this method, this will prevent
the Cell from believing this agent prematurely exited.
setValueToSend
public void setValueToSend(int v)
getValueToSend
public int getValueToSend()