metaglue
Class LocalLogManagerAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.NotifierAgent
|
+--metaglue.LocalLogManagerAgent
- public class LocalLogManagerAgent
- extends NotifierAgent
- implements LocalLogManager
Notification
So this class makes extensive use of the NotifierAgent, which we hack
slightly to make it work properly with log levels. Whenever an agent
is monitored, the spy gets all messages with the signature
"LOGLEVEL:AgentID", where LOGLEVEL is a string representation of the
logging level at which the string was sent.
- See Also:
- Serialized Form
Methods inherited from class agentland.util.NotifierAgent |
addSpy,
addSpy,
getNoteTypes,
getNotifyTable,
gossip,
hack_notify,
lookupSpy,
notify,
notify,
passNotify,
putNotifyTable,
removeAllSpies,
removeNotifyTable,
removeSpy,
removeSpy,
removeSpy,
removeSpy,
removeSpy |
Methods inherited from class metaglue.AgentAgent |
addMonitor,
alive,
defrost,
defrostAll,
defrostBoolean,
defrostInt,
defrostString,
fixAttribute,
fixAttribute,
freeze,
freeze,
freeze,
freezeAll,
freezeVar,
getAgentID,
getAttribute,
getCatalog,
getCatalogID,
getDesignation,
getFrozenVariables,
getLogLevel,
getMetaglueAgent,
getMetaglueAgentID,
getOccupation,
getProperties,
getSociety,
log,
log,
log,
obtainMetaglueAgent,
obtainMetaglueAgent,
obtainMetaglueAgentByName,
reliesOn,
reliesOn,
reliesOn,
reliesOnSynch,
removeFrozen,
replaceExceptionHandler,
setFreezeName,
setLogLevel,
setLogName,
shutdown,
startAgent,
startAgentOn,
startAgentOn,
startup,
status,
tiedTo,
tiedTo,
tiedTo,
tiedTo,
tieToDesignation,
whereAreYou |
DEBUG
public static final int DEBUG
INFO
public static final int INFO
WARNING
public static final int WARNING
ERROR
public static final int ERROR
CRITICAL
public static final int CRITICAL
LOGLEVEL
public static final String[] LOGLEVEL
LocalLogManagerAgent
public LocalLogManagerAgent(AgentID id)
throws RemoteException
propagateMessage
public void propagateMessage(int level,
AgentID id,
String s)
throws RemoteException
- Specified by:
- propagateMessage in interface LocalLogManager
addAgent
public void addAgent(AgentID id)
throws RemoteException
- Actually...these may be made obselete by the notifications already
present in the catalog, as there isn't much use for them other than
as ways to communicate status out to the log recepient
- Specified by:
- addAgent in interface LocalLogManager
killAgent
public void killAgent(AgentID id)
throws RemoteException
- Specified by:
- killAgent in interface LocalLogManager
addLogListener
public void addLogListener(AgentID id,
int lvl,
Spy lst)
throws RemoteException
- Adds a listener to a specific agent and log level
- Specified by:
- addLogListener in interface LocalLogManager
addLogListener
public void addLogListener(AgentID id,
Spy lst)
throws RemoteException
- Makes spy listen to all leveld for it
- Specified by:
- addLogListener in interface LocalLogManager
addLevelListener
public void addLevelListener(int lvl,
Spy lst)
throws RemoteException
- Adds a listener to a specific level - this will mostly be used for
critical notifications
- Specified by:
- addLevelListener in interface LocalLogManager
removeLogListener
public void removeLogListener(AgentID id,
int lvl,
Spy lst)
throws RemoteException
- Removes a specific notification
- Specified by:
- removeLogListener in interface LocalLogManager
removeLogListener
public void removeLogListener(Spy lst)
throws RemoteException
- Removes all of the notifications to lst
- Specified by:
- removeLogListener in interface LocalLogManager