|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.rmi.server.RemoteObject java.rmi.server.RemoteServer java.rmi.server.UnicastRemoteObject com.sun.faban.harness.agent.ToolAgentImpl
public class ToolAgentImpl
This class implements the ToolAgent interface. It runs in a seperate VM and is started by the GenericBenchmark. It configures and manages all tools on a particular machine and performs the ToolService API functions for this machine. Each tool is run as a seperate thread.
ToolService
,
GenericBenchmark
,
Serialized FormField Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
ToolAgentImpl()
Constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
---|
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
---|
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ToolAgentImpl() throws RemoteException
RemoteException
Method Detail |
---|
public 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 run
IOException
public boolean start(int delay) throws RemoteException
start
in interface ToolAgent
delay
- - time to delay before starting
RemoteException
public boolean start(int delay, int duration) throws RemoteException
start
in interface ToolAgent
delay
- - time to delay before startingduration
- after which tools must be stopped
RemoteException
public boolean start(int delay, String[] t) throws RemoteException
start
in interface ToolAgent
delay
- - time to delay before startingt
- - specific list of tools to start
RemoteException
- 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 stopped
RemoteException
- A communication error occurredpublic void stop()
stop
in interface ToolAgent
public void stop(String[] t)
stop
in interface ToolAgent
t
- The tools to stop.public void postprocess()
postprocess
in interface ToolAgent
public void waitFor()
waitFor
in interface ToolAgent
public void kill()
kill
in interface ToolAgent
public void unreferenced()
unreferenced
in interface Unreferenced
Unreferenced
protected LinkedHashMap<String,List<String>> parseOSToolSets()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |