Class agent.EvilAgent.EvilAgent
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class agent.EvilAgent.EvilAgent

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----agent.Agent.Agent
                   |
                   +----agent.EvilAgent.EvilAgent

public class EvilAgent
extends Agent
An Agent designed to provoke the SecurityManager on the AgentServer by trying to write directly to a file rather than through the AgentContext. A demonstration of the capabilities of the SecurityManager class.

Constructor Index

 o EvilAgent()
Constructor - does nothing by design, but it's useful to leave the println in there just to convince yourself that the Agent has been instantiated on the AgentServer.

Method Index

 o configure(Frame)
Put up a ConfigurationDialog that gets the arguments this Agent needs to run on an AgentServer.
 o getArguments()
Return whatever arguments the configure method got from the user as a Vector of Strings.
 o run()
The run loop for this Agent.
 o setArguments(Vector)
Configure the Agent with the specified Vector of Strings as 'arguments'.

Constructors

 o EvilAgent
  public EvilAgent()
Constructor - does nothing by design, but it's useful to leave the println in there just to convince yourself that the Agent has been instantiated on the AgentServer.

Methods

 o configure
  public void configure(Frame frame)
Put up a ConfigurationDialog that gets the arguments this Agent needs to run on an AgentServer.
Parameters:
frame - The frame window of the browser, needed for the dialog constructor.
Overrides:
configure in class Agent
 o getArguments
  public Vector getArguments()
Return whatever arguments the configure method got from the user as a Vector of Strings.
Returns:
A Vector of Strings that are only meaningful to the Agent itself, not to either the AgentLauncher or AgentServer.
Overrides:
getArguments in class Agent
 o setArguments
  public void setArguments(Vector ar)
Configure the Agent with the specified Vector of Strings as 'arguments'. Called by the AgentLauncher, passing the arguments it pried out of the LoadMessage.
Parameters:
ar - A Vector of Strings identical to the one returned to the AgentLauncher by getArguments.
Overrides:
setArguments in class Agent
 o run
  public void run()
The run loop for this Agent. Gets the top-level directory which this Agent is allowed to read from the properties file via the key acl.read, and checks all the files in that directory against the filenamefilter specified by the user back on the AgentLauncher.
Overrides:
run in class Thread

All Packages  Class Hierarchy  This Package  Previous  Next  Index