com.sun.faban.harness.tools
Interface Tool

All Known Implementing Classes:
Awr, GenericTool, Lockstat, Mysqlstats, OracleTool, Statit, Statspack, Wlp2

public interface Tool

The methods in this interface are the public face of all Tools configured. New tools that are dynamically added should implement this interface and belong to the tools package. Note that the GenericTool abstract class implements this interface and provides much of the functionality required by most tools. Tools can simply extend GenericTool.

Author:
Ramesh Ramachandran

Method Summary
 void configure(String toolName, List<String> args, String path, String outDir, String host, String masterhost, CmdAgentImpl cmdAgent, CountDownLatch latch)
          This method is called to configure the tool.
 void kill()
          Abort any running tools and exit.
 boolean start(int delay)
          This method is responsible for starting the tool .
 boolean start(int delay, int duration)
          This method is responsible for starting the tool after delay and stopping it after duration.
 void stop()
          This method is responsible for stopping the tool.
 

Method Detail

configure

void configure(String toolName,
               List<String> args,
               String path,
               String outDir,
               String host,
               String masterhost,
               CmdAgentImpl cmdAgent,
               CountDownLatch latch)
This method is called to configure the tool.

Parameters:
toolName - name of the tool (Executable)
args - list containing arguments to tool
path - The path, if any, to find the tool
outDir - The output directory
host - name of machine the tool is running on
masterhost - name of master machine
cmdAgent - agent The command agent used for executing tools
latch - The latch the tool uses to identify it's completion.

kill

void kill()
Abort any running tools and exit.


start

boolean start(int delay,
              int duration)
This method is responsible for starting the tool after delay and stopping it after duration. No need to call the stop at the end of the benchmark run if using this method.

Parameters:
delay - - time (sec) to delay before starting
duration - for which the tool should be run
Returns:
true if tool started successfully

start

boolean start(int delay)
This method is responsible for starting the tool .

Parameters:
delay - - time (sec) to delay before starting
Returns:
true if tool started successfully

stop

void stop()
This method is responsible for stopping the tool.