Action, Timeoutable, WaitableTestpublic class ActionProducer extends java.lang.Thread implements Action, Waitable, Timeoutable
| Modifier | Constructor | Description |
|---|---|---|
protected |
ActionProducer() |
Creates a producer.
|
protected |
ActionProducer(boolean nw) |
Creates a producer.
|
|
ActionProducer(Action a) |
Creates a producer for an action.
|
|
ActionProducer(Action a,
boolean nw) |
Creates a producer for an action.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Object |
actionProduced(java.lang.Object obj) |
Inquire for a reference to the object returned by a launched action.
|
java.lang.String |
getDescription() |
Returns the description value.
|
java.lang.Throwable |
getException() |
Returns the exception value.
|
boolean |
getFinished() |
Check if a launched action has finished.
|
java.lang.Object |
getResult() |
Get the result of a launched action.
|
Timeouts |
getTimeouts() |
Get all the time outs used by sleeps or waits used by the launched action.
|
java.lang.Object |
launch(java.lang.Object obj) |
Does nothing; the method should be overridden by inheritors.
|
java.lang.Object |
produceAction(java.lang.Object obj) |
Starts execution.
|
void |
run() |
Launch an action in a separate thread of execution.
|
void |
setActionPriority(int newPriority) |
Defines action priority in terms of thread priority.
|
void |
setOutput(TestOut out) |
Identity of the streams or writers used for print output.
|
void |
setTimeouts(Timeouts ts) |
Set all the time outs used by sleeps or waits used by the launched action.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic ActionProducer(Action a)
a - Action implementation.public ActionProducer(Action a, boolean nw)
a - Action implementation.nw - Defines if produceAction
method should wait for the end of action.protected ActionProducer()
produceAction must be overridden.protected ActionProducer(boolean nw)
produceAction must be overridden.nw - Defines if produceAction
method should wait for the end of action.public void setTimeouts(Timeouts ts)
setTimeouts in interface Timeoutablets - An object containing timeout information.Timeouts,
Timeoutable,
getTimeouts()public Timeouts getTimeouts()
getTimeouts in interface TimeoutableTimeouts,
Timeoutable,
setTimeouts(org.netbeans.jemmy.Timeouts)public void setOutput(TestOut out)
out - An object containing print output assignments for
output and error streams.TestOut,
Outputablepublic java.lang.Throwable getException()
public void setActionPriority(int newPriority)
newPriority - New thread priority.public java.lang.Object getResult()
getFinished()getFinished()public boolean getFinished()
true if the launched action has completed,
either normally or with an exception; false otherwise.public java.lang.Object launch(java.lang.Object obj)
public java.lang.String getDescription()
ActiongetDescription in interface ActiongetDescription in interface WaitableActionProducer's description.Actionpublic java.lang.Object produceAction(java.lang.Object obj)
throws java.lang.InterruptedException
obj - Parameter to be passed into action's launch(Object) method.
This parameter might be a java.lang.String[] that lists a test's
command line arguments.launch(Object) result.TimeoutExpiredExceptionjava.lang.InterruptedExceptionpublic final void run()
getFinished()
and getResult to answer questions about test
completion and return value, respectively.run in class java.lang.ThreadgetFinished(),
getResult(),
Runnablepublic final java.lang.Object actionProduced(java.lang.Object obj)
actionProduced in interface Waitableobj - Not used.Waitable