Class agent.Server.AgentServer
All Packages Class Hierarchy This Package Previous Next Index
Class agent.Server.AgentServer
java.lang.Object
|
+----java.lang.Thread
|
+----agent.Server.AgentServer
- public class AgentServer
- extends Thread
A standalone application for loading and running Agents
that are sent to it over the net.
-
bRun
-
-
currentAgentServer
-
-
f
-
-
serverList
-
-
AgentServer()
- Constructor, builds the list of AgentServers, builds all
the screen elements, including menu and menu items.
-
LoadTest()
- Test the loading of classes at this site by allowing the
user to choose a class file to load, then creating/parsing a
LoadMessage from that class file.
-
addDispatchedAgent(String, SocketHandler)
- Add an Agent to the list, using the specified ID and
SocketHandler.
-
addRunningAgent(String)
- Add an agent to the list of agents running on this machine.
-
deleteDispatchedAgent(String)
- Delete an agent from the list of dispatched agents
because he's ended.
-
deleteDispatchedAgent(SocketHandler)
- Delete an agent from the list of dispatched agents
because of a socket exception.
-
deleteRunningAgent(String)
- Delete an agent from the list of running agents.
-
main(String[])
- The main loop for this standalone application.
-
notifyResults(ResultMessage)
- Notify the AgentLauncher, via the dispatching agent server
that the agent has finished running and has the specified
results to report.
-
notifyStart(StartMessage)
- Notify the AgentLauncher, via the dispatching agent server
that the agent has started running.
-
reportResults(ResultMessage)
- Add this Agents results to the cumulative results page that
we've been amassing for the whole run of this Agent.
-
run()
- The main loop for the AgentServer.
f
public static ServerFrame f
bRun
public static boolean bRun
currentAgentServer
public static AgentServer currentAgentServer
serverList
public static Vector serverList
AgentServer
public AgentServer()
- Constructor, builds the list of AgentServers, builds all
the screen elements, including menu and menu items. For now,
this app only handles exit from the menu. Instantiates an
acceptor thread that listens to the AgentServer port where
agents to be loaded will come in.
- See Also:
- Frame, Panel, MenuBar, MenuItem, Acceptor
main
public static void main(String argv[])
- The main loop for this standalone application. Creates one
AgentServer, then sets it running via Thread.start.
- See Also:
- Thread
reportResults
public void reportResults(ResultMessage r)
- Add this Agents results to the cumulative results page that
we've been amassing for the whole run of this Agent.
- Parameters:
- r - The ResultMessage that the Agent is sending back to
the AgentLauncher.
LoadTest
public void LoadTest()
- Test the loading of classes at this site by allowing the
user to choose a class file to load, then creating/parsing a
LoadMessage from that class file. DEBUGGING method.
- See Also:
- LoadMessage, FileDialog
notifyResults
public void notifyResults(ResultMessage rm)
- Notify the AgentLauncher, via the dispatching agent server
that the agent has finished running and has the specified
results to report.
- Parameters:
- rm - A results message containing the results page URL
- See Also:
- ResultsMessage
notifyStart
public void notifyStart(StartMessage sm)
- Notify the AgentLauncher, via the dispatching agent server
that the agent has started running.
- Parameters:
- sm - A StartMessage
- See Also:
- StartMessage
addDispatchedAgent
public void addDispatchedAgent(String id,
SocketHandler sh)
- Add an Agent to the list, using the specified ID and
SocketHandler.
- See Also:
- SocketHandler
deleteDispatchedAgent
public void deleteDispatchedAgent(String id)
- Delete an agent from the list of dispatched agents
because he's ended.
- Parameters:
- id - The String id of the terminating Agent.
deleteDispatchedAgent
public void deleteDispatchedAgent(SocketHandler sh)
- Delete an agent from the list of dispatched agents
because of a socket exception.
- Parameters:
- sh - The SocketHandler that generated the exception.
addRunningAgent
public void addRunningAgent(String id)
- Add an agent to the list of agents running on this machine.
- Parameters:
- id - The String ID of this running agent.
deleteRunningAgent
public void deleteRunningAgent(String id)
- Delete an agent from the list of running agents. The
Agent thread MUST BE STOPPED already when you get here.
- Parameters:
- id - The String id of the running agent.
run
public void run()
- The main loop for the AgentServer. Sits in a loop,
sleeping for 1 second, then waking up to check whether the user
interface has been terminated.
- Overrides:
- run in class Thread
All Packages Class Hierarchy This Package Previous Next Index