agentland.rufus
Class ConfuciusAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
|
+--agentland.rufus.ConfuciusAgent
- All Implemented Interfaces:
- Agent, Confucius, Good, MetagluePrimitives, Remote, Serializable, Spy
- public class ConfuciusAgent
- extends GoodAgent
- implements Confucius
This agent can be used to get a random saying whenever desired.
New sayings can be stored at any time.
With a better sql interface we could make cool lookups (for features
such as length and content) for these sayings. Also would be nice
to have a big saying agent which uses a bunch of little ones, and Unix
fortune, etc.
- See Also:
- Serialized Form
Methods inherited from class agentland.util.GoodAgent |
addSpy, addSpy, alert, alertString, beep, error, getAlert, 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, reliesOn, 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 |
CONFUCIUS_EMPTY
public static String CONFUCIUS_EMPTY
CONFUCIUS_CONFUSED
public static String CONFUCIUS_CONFUSED
ConfuciusAgent
public ConfuciusAgent()
throws RemoteException
useSayingBase
public void useSayingBase(String mapname)
- 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
addSaying
public void addSaying(String saying)
throws RemoteException
- Specified by:
addSaying
in interface Confucius
setSaying
public void setSaying(int ind,
String saying)
throws RemoteException
- Specified by:
setSaying
in interface Confucius
getSaying
public String getSaying()
throws RemoteException
- Specified by:
getSaying
in interface Confucius
numSayings
public int numSayings()
throws RemoteException
- Specified by:
numSayings
in interface Confucius
getSayingNumber
public String getSayingNumber(int i)
- Specified by:
getSayingNumber
in interface Confucius
listSayings
public void listSayings()
throws RemoteException
- Description copied from interface:
Confucius
- Print to console.
- Specified by:
listSayings
in interface Confucius