agentland.device.led
Class LEDManagerAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
|
+--agentland.resource.ManagedAgent
|
+--agentland.device.led.LEDManagerAgent
- All Implemented Interfaces:
- Agent, Good, LEDManager, Managed, MetagluePrimitives, Remote, Serializable, Spy
- public class LEDManagerAgent
- extends ManagedAgent
- implements LEDManager
Describe class LEDManagerAgent
here.
- See Also:
ManagedAgent
,
LEDManager
,
TextObject
, Serialized Form
Field Summary |
protected AgentID |
currentSource
Currently displayed source |
protected TimerTask |
currentTask
|
protected Queue |
queue
Queue of all the sources contributing things to
display (we have only one text per source but this text might
change while the source is in the queue, this is why we are
queueing sources and not actual text objects) |
protected AlphaLEDSign |
sign
|
protected Timer |
timer
|
Methods inherited from class agentland.resource.ManagedAgent |
connect, getAlert, getNeed, isAvailable, isAvailable, reliesOn, reliesOn, replace, replace, request, request, request, requestAgent, requestAgent, resources, resourcesByAgentID, setNeed, tiedTo, yank, yank, yank |
Methods inherited from class agentland.util.GoodAgent |
addSpy, addSpy, alert, alertString, beep, error, getHistory, getHistoryElement, getPersistentMap, log, notify, removeSpy, removeSpy, resetHistory, safeRely, safeRely, safeRely, setNiceLogName, tell |
Methods inherited from class metaglue.AgentAgent |
addMonitor, alive, buildEHAFor, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getOldLogs, getProperties, getProxyHandlerClass, getSociety, installAPH, log, log, lookupClass, reliesOn, reliesOnSynch, removeAPHFromCatalog, removeFrozen, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, toString, whereAreYou |
Methods inherited from interface agentland.util.Spy |
tell |
sign
protected AlphaLEDSign sign
queue
protected Queue queue
- Queue of all the sources contributing things to
display (we have only one text per source but this text might
change while the source is in the queue, this is why we are
queueing sources and not actual text objects)
currentSource
protected AgentID currentSource
- Currently displayed source
timer
protected Timer timer
currentTask
protected TimerTask currentTask
LEDManagerAgent
public LEDManagerAgent()
throws RemoteException
outputText
public void outputText(AgentID source,
TextObject tObject)
- Specified by:
outputText
in interface LEDManager
outputText
public void outputText(AgentID source,
TextObject tObject,
LEDProperties prop)
- Specified by:
outputText
in interface LEDManager
clear
public void clear(AgentID source)
throws RemoteException
- Removes the object associated with the source from the queue of stuff to be displayed
- Specified by:
clear
in interface LEDManager
showText
protected void showText(TextObject tObject)
clearSign
protected void clearSign()
addNewItem
protected void addNewItem(AgentID source,
TextObject tObject,
LEDProperties prop)
- Adds new text object and the associated info to all relevant date
structures; if there already was something from the source,
appropriate updates will take place.
expireSource
protected void expireSource(AgentID source)
- Removes all info associated with the particular source from all data structures.
showNextItem
protected long showNextItem()
- Displays next item in the queue, if queue is non-empty
- Returns:
- the time this item should be displayed for (in
miliseconds)
tick
public void tick()
- The method called at every "heart-beat" of the system -- it makes
the items change on the display