Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.mit.media.hive.agent.filter
Class EventNumberTranslatingAgentImpl  view EventNumberTranslatingAgentImpl download EventNumberTranslatingAgentImpl.java

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byedu.mit.media.hive.agent.AgentImpl
                  extended byedu.mit.media.hive.agent.EventReceivingAgentImpl
                      extended byedu.mit.media.hive.agent.EventTransceivingAgentImpl
                          extended byedu.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 $

Field Summary
protected  java.lang.Integer valueObject
           
 int valueToSend
           
 
Fields inherited from class edu.mit.media.hive.agent.EventTransceivingAgentImpl
eventSendingHelper
 
Fields inherited from class edu.mit.media.hive.agent.EventReceivingAgentImpl
agentSubscriptions
 
Fields inherited from class edu.mit.media.hive.agent.AgentImpl
AGENTKILLED, AGENTMOVED, agentThreadGroup, commandList, commands, description, icon, iconName, myCell, readyFlag, stopCode, timeToStop
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
EventNumberTranslatingAgentImpl()
           
 
Method Summary
 void doBehavior()
          Do the basic behavior for an agent, the agent's main loop.
 int getValueToSend()
           
 void notify(edu.mit.media.hive.event.HiveEvent event)
          When an event is received, send a number object.
 void setValueToSend(int v)
           
 
Methods inherited from class edu.mit.media.hive.agent.EventTransceivingAgentImpl
addListener, addListener, addListener, addListener, doLocalSetup, eventSendingError, getEventCount, listAllIncomingConnections, listAllOutgoingConnections, removeListener
 
Methods inherited from class edu.mit.media.hive.agent.EventReceivingAgentImpl
connectTo, diePlease, disconnectFrom, disconnectFromAll, notify, subscribeTo
 
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 class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.mit.media.hive.agent.Agent
blockUntilReady, configure, connectTo, diePlease, disconnectFrom, disconnectFromAll, getActionCommands, getCell, getDescription, getIcon, getName, invokeActionCommand, isReady
 
Methods inherited from interface edu.mit.media.hive.rdf.Describable
setDescription
 
Methods inherited from interface edu.mit.media.hive.event.RemoteEventListener
notify
 

Field Detail

valueToSend

public int valueToSend

valueObject

protected java.lang.Integer valueObject
Constructor Detail

EventNumberTranslatingAgentImpl

public EventNumberTranslatingAgentImpl()
                                throws java.rmi.RemoteException
Method Detail

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()