|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread com.sun.faban.driver.engine.AgentThread
public abstract class AgentThread
Abstract superclass for all driver threads. It provides a factory for instantiating the right implementation depending on the driver specification. Subclasses execute the provided driver, keeps track of response times, think times, transaction counts, etc.
Nested Class Summary | |
---|---|
static class |
AgentThread.RunState
The various run states for an AgentThread . |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static long |
TIME_NOT_SET
Constant value for specifying that the time is not set. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AgentThread()
|
Method Summary | |
---|---|
static AgentThread |
getInstance(String type,
String agentId,
int id,
Class<?> driverClass,
Timer timer,
AgentImpl agent)
Factory method for instantiating the right type of AgentThread. |
Metrics |
getResult()
Return results of this thread. |
AgentThread.RunState |
getThreadState()
Obtains the state of the current thread. |
void |
run()
Entry point for starting the thread. |
void |
stopExecution()
Triggers stopping and exiting of this thread. |
void |
waitThreadState(AgentThread.RunState state)
Waits for a given state of the thread to arrive. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long TIME_NOT_SET
Constructor Detail |
---|
public AgentThread()
Method Detail |
---|
public static AgentThread getInstance(String type, String agentId, int id, Class<?> driverClass, Timer timer, AgentImpl agent)
type
- The type of this agentagentId
- The display id of this agentid
- The id of this agentdriverClass
- The driver classtimer
- The timer object referenceagent
- The agent calling this thread
public final void run()
run
in interface Runnable
run
in class Thread
public AgentThread.RunState getThreadState()
public void waitThreadState(AgentThread.RunState state)
state
- The state to wait for.public Metrics getResult()
public void stopExecution()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |