agentland.rufus
Class DaemonAgent
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
- All Implemented Interfaces:
- Agent, Daemon, Good, Managed, MetagluePrimitives, Remote, Serializable, Spy
- Direct Known Subclasses:
- ConfuciusClockAgent, NewsDisplayAgent
- public class DaemonAgent
- extends ManagedAgent
- implements Daemon
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.)
How it waits a random amount of time. (Min 1/3 mean time)
cycles wait 1/3 mean time until it gets a head, then
waits rand( 0..2/3 m.t. )
waits a third the mean time number of seconds since E[ get head ]
= 2 * p( get head ) So we expect to get a coin hit at 2/3[ mean
time ];
- 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 |
DaemonAgent
public DaemonAgent()
throws RemoteException
stopDaemon
public void stopDaemon()
throws RemoteException
- Description copied from interface:
Daemon
- Stop the mumbling process.
- Specified by:
stopDaemon
in interface Daemon
startDaemon
public void startDaemon()
throws RemoteException
- Description copied from interface:
Daemon
- Start the quoting process.
- Specified by:
startDaemon
in interface Daemon
isStopped
public boolean isStopped()
- Specified by:
isStopped
in interface Daemon
- Following copied from interface:
agentland.rufus.Daemon
- Returns:
- true if it is mumbling.
act
public void act()
getMeanTime
public int getMeanTime()
throws RemoteException
- Returns the mean time in seconds between actions
- Specified by:
getMeanTime
in interface Daemon
setMeanTime
public void setMeanTime(int seconds)
throws RemoteException
- Specified by:
setMeanTime
in interface Daemon