agentland.util
Class GoodAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
- All Implemented Interfaces:
- Agent, Good, MetagluePrimitives, Remote, Serializable, Spy
- Direct Known Subclasses:
- ComputerIDResolverAgent, ConfuciusAgent, ConnectionMakerAgent, DrapesManagerSpeechAgent, LightManagerSpeechAgent, LoggerAgent, ManagedAgent, NamerAgent, ProjectorManagerSpeechAgent, SecretFinderAgent, SocietyAgent, SpeechAgent, TestAgent, TransparentResourceManagerAgent, UserInfoAgent, WebInterfaceAgent
- public class GoodAgent
- extends AgentAgent
- implements Good, Spy
- See Also:
- Serialized Form
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 |
alert
protected Beeper alert
notifier
protected Notifier notifier
GoodAgent
public GoodAgent()
throws RemoteException
resetHistory
public void resetHistory()
throws RemoteException
- Specified by:
resetHistory
in interface Good
getHistory
public Vector getHistory()
throws RemoteException
- Specified by:
getHistory
in interface Good
getHistoryElement
public String getHistoryElement(int i)
throws RemoteException
- Specified by:
getHistoryElement
in interface Good
log
public void log(int level,
String info)
- Description copied from class:
AgentAgent
- Send a log message to the logging stream. The log level will be
one of the level constants listed in LogStream.
- Overrides:
log
in class AgentAgent
- Following copied from class:
metaglue.AgentAgent
- Parameters:
level
- The log level.info
- The string to send to the log.- See Also:
LogStream
error
public void error(String info)
getAlert
protected void getAlert()
throws RemoteException
beep
public void beep()
throws RemoteException
alert
public void alert(String s)
alertString
protected void alertString(String s)
- Print to console a string with *s to inform user in a nice and
visible way.
notify
public void notify(String name,
Serializable details)
addSpy
protected void addSpy(String methodName,
String noteType)
addSpy
protected void addSpy(String noteType)
removeSpy
protected void removeSpy(String methodName,
String noteType)
- Removes a spy.
- Parameters:
methodName
- a String
valuenoteType
- a String
value
removeSpy
protected void removeSpy(String noteType)
- Removes a spy.
- Parameters:
noteType
- a String
value
tell
public void tell(Secret s)
throws RemoteException
- Default callback for addSpy()
- Specified by:
tell
in interface Spy
- Following copied from interface:
agentland.util.Spy
- Parameters:
secret
- a Secret
value- Throws:
RemoteException
- if an error occurs
safeRely
protected Agent safeRely(String s)
- Deprecated. Use reliesOn( String ).
safeRely
protected Agent safeRely(AgentID s)
- Deprecated. Use reliesOn( AgentID ).
safeRely
protected Agent safeRely(String s,
String t)
- Deprecated. Use reliesOn( AgentID ).
setNiceLogName
protected void setNiceLogName(String name)
- Set log name to given name, but add designation if designation
is not "".
getPersistentMap
protected Map getPersistentMap(String start_name)
- Get persistent map from where-ever they are stored. NOTE: These
maps have agentID's OCCUPATION scope. If name is null or "",
then just use occupation, else use occupation and then "-" and
then the name.