|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.faban.harness.tools.ToolWrapper
public class ToolWrapper
This class is a wrapper for tool.
Field Summary | |
---|---|
protected Timer |
timer
The timer used for scheduling the tools. |
Constructor Summary | |
---|---|
ToolWrapper(Class toolClass,
MasterToolContext ctx)
Constructor. |
Method Summary | |
---|---|
void |
configure(String toolName,
String path,
String outDir,
String host,
CmdAgentImpl cmdAgent,
CountDownLatch latch)
This method is responsible for configuring a tool. |
protected void |
finish()
Finishes up the tool and notifies the infrastructure of the tool finishing up. |
void |
kill()
This method is responsible for killing the tool utility. |
void |
postprocess()
This method is responsible for postprocessing. |
boolean |
start(int delay)
This method is responsible for starting a tool with given delay. |
boolean |
start(int delay,
int duration)
This method is responsible for starting a tool with given delay and duration. |
void |
stop()
This method is responsible for stopping the tool utility. |
protected void |
stop(boolean warn)
This method is responsible for stopping the tool utility. |
protected void |
xferLog()
Transfers the tool output file back to the master. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Timer timer
Constructor Detail |
---|
public ToolWrapper(Class toolClass, MasterToolContext ctx) throws Exception
toolClass
- ctx
-
Exception
Method Detail |
---|
public void postprocess() throws Exception
Exception
public void configure(String toolName, String path, String outDir, String host, CmdAgentImpl cmdAgent, CountDownLatch latch) throws Exception
toolName
- The name of the tool.path
- The path to start the commandoutDir
- The tool output directoryhost
- The host the tool should runcmdAgent
- The local command agentlatch
- The latch used for identifying tool completion
Exception
- If there is any errorpublic boolean start(int delay)
delay
- The lapse time after which the tool will start
public boolean start(int delay, int duration)
delay
- The lapse time after which the tool will startduration
- The duration the tool is to run
public void stop() throws Exception
Exception
protected void stop(boolean warn) throws Exception
warn
- Whether to warn if the tool already ended.
Exception
protected void xferLog()
protected void finish()
public void kill() throws Exception
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |