agentland.rufus
Class ConfuciusClockAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
|
+--agentland.resource.ManagedAgent
|
+--agentland.rufus.DaemonAgent
|
+--agentland.rufus.ConfuciusClockAgent
- All Implemented Interfaces:
- Agent, Confucius, ConfuciusClock, Daemon, Good, Managed, MetagluePrimitives, Remote, Serializable, Spy
- Direct Known Subclasses:
- ConfuciusSignAgent, MumbleAgent
- public class ConfuciusClockAgent
- extends DaemonAgent
- implements ConfuciusClock
This agent announces random sayings every so often. It also sends
out an event via notifier so other agents can get it. ("confucius"
is message type.)
- See Also:
- Serialized Form
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 |
ConfuciusClockAgent
public ConfuciusClockAgent()
throws RemoteException
stopClock
public void stopClock()
throws RemoteException
- Specified by:
stopClock
in interface ConfuciusClock
startClock
public void startClock()
throws RemoteException
- Specified by:
startClock
in interface ConfuciusClock
getConfucius
protected Confucius getConfucius(Object which)
throws RemoteException
setSilent
public void setSilent(boolean silent)
throws RemoteException
- Description copied from interface:
ConfuciusClock
- true means do not talk, only send out events.
- Specified by:
setSilent
in interface ConfuciusClock
act
public void act()
- Overrides:
act
in class DaemonAgent
pontificate
protected void pontificate(String what)
getSayingNumber
public String getSayingNumber(int i)
throws RemoteException
- Specified by:
getSayingNumber
in interface Confucius
getSaying
public String getSaying()
throws RemoteException
- Specified by:
getSaying
in interface Confucius
scheduleSaying
public void scheduleSaying(String s)
- Description copied from interface:
ConfuciusClock
- schedule a saying to be mumbled (i.e. temporarily augment
the database.
- Specified by:
scheduleSaying
in interface ConfuciusClock
addSaying
public void addSaying(String saying)
throws RemoteException
- Specified by:
addSaying
in interface Confucius
numSayings
public int numSayings()
throws RemoteException
- Specified by:
numSayings
in interface Confucius
setSaying
public void setSaying(int ind,
String saying)
throws RemoteException
- Specified by:
setSaying
in interface Confucius
fix
public void fix()
throws RemoteException
useSayingBase
public void useSayingBase(String mapname)
throws RemoteException
- Description copied from interface:
Confucius
- Use the saying database that the Conf. Agent of the given
designation mapname would use.
- Specified by:
useSayingBase
in interface Confucius
getConfucius
public AgentID getConfucius()
throws RemoteException
- Description copied from interface:
ConfuciusClock
- Get the Confucius used by this clock.
- Specified by:
getConfucius
in interface ConfuciusClock
listSayings
public void listSayings()
throws RemoteException
- Print to console.
- Specified by:
listSayings
in interface Confucius