|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.netbeans.jemmy.ActionProducer
public class ActionProducer
Runs actions with or without waiting.
Timeouts used:
ActionProducer.MaxActionTime - time action should be finished in.
Action
,
Timeouts
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
protected |
ActionProducer()
Creates a producer. |
|
ActionProducer(Action a)
Creates a producer for an action. |
|
ActionProducer(Action a,
boolean nw)
Creates a producer for an action. |
protected |
ActionProducer(boolean nw)
Creates a producer. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Thread |
---|
activeCount, 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, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public 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.Method Detail |
---|
public void setTimeouts(Timeouts ts)
setTimeouts
in interface Timeoutable
ts
- An object containing timeout information.Timeouts
,
Timeoutable
,
getTimeouts()
public Timeouts getTimeouts()
getTimeouts
in interface Timeoutable
Timeouts
,
Timeoutable
,
setTimeouts(org.netbeans.jemmy.Timeouts)
public void setOutput(TestOut out)
out
- An object containing print output assignments for
output and error streams.TestOut
,
Outputable
public 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)
launch
in interface Action
obj
- An object used to modify execution. This might be a
java.lang.String[]
that lists a test's command line
arguments.
Action
public java.lang.String getDescription()
Action
getDescription
in interface Action
getDescription
in interface Waitable
ActionProducer
's description.Action
public 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.
TimeoutExpiredException
java.lang.InterruptedException
public final void run()
getFinished()
and getResult
to answer questions about test
completion and return value, respectively.
run
in interface java.lang.Runnable
run
in class java.lang.Thread
getFinished()
,
getResult()
,
Runnable
public final java.lang.Object actionProduced(java.lang.Object obj)
actionProduced
in interface Waitable
obj
- Not used.
Waitable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |