public class ToolAgentImpl extends UnicastRemoteObject implements ToolAgent, Unreferenced
ToolService
,
GenericBenchmark
,
Serialized Formref
Constructor and Description |
---|
ToolAgentImpl()
Constructor for Tool agent implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
configure(List<MasterToolContext> toolList,
Set<String> osToolSet,
String outDir)
This method configures the tools that must be run on
this machine by calling the configure method on each of
the specified tools.
|
void |
kill()
Kills all the tools.
|
protected LinkedHashMap<String,List<String>> |
parseOSToolSets()
Obtains the OS toolsets.
|
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[] t)
Start only specified tools.
|
boolean |
start(int delay,
String[] t,
int duration)
Start only specified tools for specific duration.
|
void |
stop()
This method is responsible for stopping the tools.
|
void |
stop(String[] t)
Stopping specific tools.
|
void |
unreferenced()
When this instance is unreferenced the application must exit.
|
void |
waitFor()
Waits for all tools to finish up.
|
clone, exportObject, exportObject, exportObject, unexportObject
getClientHost, getLog, setLog
public ToolAgentImpl() throws RemoteException
RemoteException
- Error constructing ToolAgentImplpublic void configure(List<MasterToolContext> toolList, Set<String> osToolSet, String outDir) throws IOException
configure
in interface ToolAgent
toolList
- - each element in the array is the
name of a tool and optional arguments, e.g "sar -u -c"osToolSet
- list of os toolsoutDir
- output directory of the runIOException
public boolean start(int delay) throws RemoteException
start
in interface ToolAgent
delay
- - time to delay before startingRemoteException
public boolean start(int delay, int duration) throws RemoteException
start
in interface ToolAgent
delay
- - time to delay before startingduration
- after which tools must be stoppedRemoteException
public boolean start(int delay, String[] t) throws RemoteException
start
in interface ToolAgent
delay
- - time to delay before startingt
- - specific list of tools to startRemoteException
- A communication error occurredpublic boolean start(int delay, String[] t, int duration) throws RemoteException
start
in interface ToolAgent
delay
- - time to delay before startingt
- - specific list of tools to startduration
- after which tools must be stoppedRemoteException
- A communication error occurredpublic void stop()
public void stop(String[] t)
public void postprocess()
postprocess
in interface ToolAgent
public void waitFor()
public void unreferenced()
unreferenced
in interface Unreferenced
Unreferenced
protected LinkedHashMap<String,List<String>> parseOSToolSets()