Class AgentDispatcher

Class AgentDispatcher

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----AgentDispatcher

class AgentDispatcher
extends Thread
There is one AgentDispatcher active at any one time. It maintains a CONSTANT connection from the AgentLauncher to the Dispatching AgentServer.

Constructor Index

 o AgentDispatcher(String, int)

Method Index

 o ClientProcess(byte[], int)
Parse a message from the dispatching agent server.
 o Dispatch(String, String, Vector)
Tell the dispatching agent server to dispatch this agent.
 o StopAgent(String)
Dispatch a kill message to all servers telling them to terminate the named Agent with prejudice.
 o run()
The main run loop for this thread.

Constructors

 o AgentDispatcher
  public AgentDispatcher(String ServerName,
                         int port)

Methods

 o StopAgent
  public void StopAgent(String id)
Dispatch a kill message to all servers telling them to terminate the named Agent with prejudice.
 o Dispatch
  public void Dispatch(String Name,
                       String ID,
                       Vector Args)
Tell the dispatching agent server to dispatch this agent.
 o run
  public void run()
The main run loop for this thread. Sits in a loop reading the socket and processing messages. The only messages that should come in over this socket are StartMessage and ResultsMessage.
Overrides:
run in class Thread
 o ClientProcess
  public void ClientProcess(byte b[],
                            int numbytes)
Parse a message from the dispatching agent server. Only valid message types are Start and Results. Take appropriate action for each message type, updating the AgentLauncher display.