com.sun.faban.harness.tools
Class CommandLineTool

java.lang.Object
  extended by com.sun.faban.harness.tools.CommandLineTool
Direct Known Subclasses:
Collector, Cpustat, Jvmstat

public class CommandLineTool
extends Object

This class handles the command line tools. Like, vmstat, mpstat, etc.

Author:
Sheetal Patil

Field Summary
 ToolContext ctx
          The injected tool context.
 
Constructor Summary
CommandLineTool()
           
 
Method Summary
 void config()
          Configures the command line tool.
 void start()
          This method is responsible for starting the command line tool.
 void stop()
          This method is responsible for stopping the command line tool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ctx

public ToolContext ctx
The injected tool context.

Constructor Detail

CommandLineTool

public CommandLineTool()
Method Detail

config

public void config()
Configures the command line tool. Tasks done in this method includes building the toolCmd using the params from the tool context.


start

public void start()
           throws IOException,
                  InterruptedException
This method is responsible for starting the command line tool.

Throws:
IOException - Error starting the command
InterruptedException - Interrupted waiting for commands

stop

public void stop()
          throws IOException,
                 InterruptedException
This method is responsible for stopping the command line tool.

Throws:
IOException - Error stopping the command
InterruptedException - Interrupted waiting for commands