unsw.cse.mica.runner
Class AgentHandler

java.lang.Object
  extended by java.util.Observable
      extended by unsw.cse.mica.runner.ProcessHandler
          extended by unsw.cse.mica.runner.AgentHandler
All Implemented Interfaces:
java.util.Observer

public class AgentHandler
extends ProcessHandler

The class for managing Agent child processes.

Author:
jhw

Field Summary
static java.lang.String DISCONNECT
           
static java.lang.String START
           
 
Fields inherited from class unsw.cse.mica.runner.ProcessHandler
PROCESS_MESSAGE_INITIALISED, PROCESS_MESSAGE_INITIALISING, PROCESS_MESSAGE_PREFIX, PROCESS_MESSAGE_TERMINATED, PROCESS_MESSAGE_TERMINATING, STATE_INITIALISING, STATE_PENDING, STATE_READY, STATE_RUNNING, STATE_TERMINATING, UPDATE_RESTART, UPDATE_STATE
 
Constructor Summary
AgentHandler(java.lang.String name, java.lang.String className, AgentSettings settings)
           
 
Method Summary
static void main(java.lang.String[] args)
          To use as a standalone agent wrapper: java AgentHandler classname [params] -- [properties] classname is the fully qualified classname of the agent that will be started.
 boolean terminateAllowed()
           
 
Methods inherited from class unsw.cse.mica.runner.ProcessHandler
addRequired, getName, getOutputStream, getParentFrame, getState, kill, setChangedNotify, setOutputStream, setParentFrame, start, terminate, toString, update
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START

public static final java.lang.String START
See Also:
Constant Field Values

DISCONNECT

public static final java.lang.String DISCONNECT
See Also:
Constant Field Values
Constructor Detail

AgentHandler

public AgentHandler(java.lang.String name,
                    java.lang.String className,
                    AgentSettings settings)
Method Detail

terminateAllowed

public boolean terminateAllowed()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
To use as a standalone agent wrapper: java AgentHandler classname [params] -- [properties] classname is the fully qualified classname of the agent that will be started. [params] is zero or more of: -host=HOST -port=PORT -debug=DEBUG (either a number or a debug level name) -[no]catch [properties] is a set of properties that will be passed to the agent's init method. Each should be of the form param=value, but note that some characters (currently = and &) are escaped in the "param" part of the string.

Throws:
java.lang.Exception