com.sun.faban.harness.agent
Interface ToolAgent

All Superinterfaces:
Remote
All Known Implementing Classes:
ToolAgentImpl

public interface ToolAgent
extends Remote

The methods in this interface are the public face of all ToolAgents configured on the various machines. The ToolService starts up all the ToolAgents and gets a handle to this interface. All Tool reequests from the benchmark should be routed through the ToolService.

Author:
Ramesh Ramachandran
See Also:
ToolService

Method Summary
 void configure(List<MasterToolContext> toollist, Set<String> osToolSet, String outDir)
          This method configures the tools that must be run on this machine.
 void kill()
          This method is responsible for killing all tools.
 void postprocess()
          This method is responsible for post processing tools.
 boolean start(int delay)
          This method is responsible for starting all tools.
 boolean start(int delay, int duration)
          This method is responsible for starting all tools.
 boolean start(int delay, String[] tools)
          Start only specified tools.
 boolean start(int delay, String[] tools, int duration)
          Start only specified tools for specific duration.
 void stop()
          This method is responsible for stopping the tools.
 void stop(String[] tools)
          Stopping specific tools.
 void waitFor()
          Waits for all tools to finish up.
 

Method Detail

configure

void configure(List<MasterToolContext> toollist,
               Set<String> osToolSet,
               String outDir)
               throws RemoteException,
                      IOException
This method configures the tools that must be run on this machine.

Parameters:
toollist - - each element in the array is the name of a tool and optional arguments, e.g "sar -u -c"
osToolSet - list of os tools
outDir - output directory of the run
Throws:
RemoteException, - IOException
RemoteException
IOException

kill

void kill()
          throws RemoteException
This method is responsible for killing all tools.

Throws:
RemoteException

start

boolean start(int delay)
              throws RemoteException
This method is responsible for starting all tools.

Parameters:
delay - - time to delay before starting
Returns:
true if tool started successfully
Throws:
RemoteException

start

boolean start(int delay,
              int duration)
              throws RemoteException
This method is responsible for starting all tools.

Parameters:
delay - - time to delay before starting
duration - after which tools must be stopped
Returns:
true if tool started successfully
Throws:
RemoteException

start

boolean start(int delay,
              String[] tools)
              throws RemoteException
Start only specified tools.

Parameters:
delay - - time to delay before starting
tools - - specific list of tools to start
Returns:
true if all tools are started successfully, false otherwise
Throws:
RemoteException - A communication error occurred

start

boolean start(int delay,
              String[] tools,
              int duration)
              throws RemoteException
Start only specified tools for specific duration.

Parameters:
delay - - time to delay before starting
tools - - specific list of tools to start
duration - after which tools must be stopped
Returns:
true if all tools are started successfully, false otherwise
Throws:
RemoteException - A communication error occurred

stop

void stop()
          throws RemoteException
This method is responsible for stopping the tools.

Throws:
RemoteException - A communication error occurred

stop

void stop(String[] tools)
          throws RemoteException
Stopping specific tools.

Parameters:
tools - The tools to stop.
Throws:
RemoteException - A communication error occurred

waitFor

void waitFor()
             throws RemoteException
Waits for all tools to finish up.

Throws:
RemoteException - A communication error occurred

postprocess

void postprocess()
                 throws RemoteException
This method is responsible for post processing tools.

Throws:
RemoteException - A communication error occurred