agentland.util
Class SuperSpyAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
|
+--agentland.resource.ManagedAgent
|
+--agentland.util.SuperSpyAgent
- All Implemented Interfaces:
- Agent, Good, Managed, MetagluePrimitives, Remote, Serializable, Spy, SuperSpy
- public class SuperSpyAgent
- extends ManagedAgent
- implements SuperSpy
Agent for collecting and archiving all secrets sent by all other agents.
- See Also:
- Serialized Form
Method Summary |
Vector |
getAllSecrets()
Returns a vector containing all secrets stored in the database. |
Vector |
query(String s)
Performs a SQL query on the metaglue database with the given command string. |
void |
saySomething()
Used for testing only. |
void |
tell(Secret s)
Called when another agent sends a secret. |
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 |
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 |
SuperSpyAgent
public SuperSpyAgent()
throws RemoteException
tell
public void tell(Secret s)
throws RemoteException
- Called when another agent sends a secret. Adds the secret to the database
- Specified by:
tell
in interface SuperSpy
- Overrides:
tell
in class GoodAgent
- Following copied from interface:
agentland.util.Spy
- Parameters:
secret
- a Secret
value- Throws:
RemoteException
- if an error occurs
saySomething
public void saySomething()
throws RemoteException
- Used for testing only. Sends a secret which is (of course) added to the database
by this agent's tell() method.
- Specified by:
saySomething
in interface SuperSpy
query
public Vector query(String s)
throws RemoteException,
SQLException
- Performs a SQL query on the metaglue database with the given command string.
- Specified by:
query
in interface SuperSpy
getAllSecrets
public Vector getAllSecrets()
throws RemoteException,
SQLException
- Returns a vector containing all secrets stored in the database.
- Specified by:
getAllSecrets
in interface SuperSpy