|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.netbeans.jemmy.Waiter
public class Waiter
Waits for something defined by Waitable interface to be happened.
Timeouts used:
Waiter.TimeDelta - time delta to check actionProduced result.
Waiter.WaitingTime - maximal waiting time
Waiter.AfterWaitingTime - time to sleep after waiting has been finished.
Timeouts,
Waitable| Constructor Summary | |
|---|---|
protected |
Waiter()
Can be used from subclass. |
|
Waiter(Waitable w)
Constructor. |
| Method Summary | |
|---|---|
java.lang.Object |
actionProduced(java.lang.Object obj)
Checks if wait criteria have been met. |
protected java.lang.String |
getActionProducedMessage(long timeSpent,
java.lang.Object result)
Returns message to be printed when waiting has been successfully finished. |
java.lang.String |
getDescription()
Returns description. |
protected java.lang.String |
getGoldenActionProducedMessage()
Returns message to be printed int golden output when waiting has been successfully finished. |
protected java.lang.String |
getGoldenTimeoutExpiredMessage()
Returns message to be printed int golden output when waiting timeout has been expired. |
protected java.lang.String |
getGoldenWaitingStartedMessage()
Returns message to be printed int golden output before waiting start. |
TestOut |
getOutput()
Returns print output streams or writers. |
protected java.lang.String |
getTimeoutExpiredMessage(long timeSpent)
Returns message to be printed when waiting timeout has been expired. |
Timeouts |
getTimeouts()
Return current timeouts. |
protected java.lang.String |
getWaitingStartedMessage()
Returns message to be printed before waiting start. |
void |
setOutput(TestOut out)
Defines print output streams or writers. |
void |
setTimeouts(Timeouts timeouts)
Defines current timeouts. |
protected long |
timeFromStart()
Returns time from waiting start. |
java.lang.Object |
waitAction(java.lang.Object waitableObject)
Waits for not null result of actionProduced method of Waitable implementation passed into constructor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Waiter(Waitable w)
w - Waitable object defining waiting criteria.protected Waiter()
| Method Detail |
|---|
public void setTimeouts(Timeouts timeouts)
setTimeouts in interface Timeoutabletimeouts - A collection of timeout assignments.Timeoutable,
Timeouts,
getTimeouts()public Timeouts getTimeouts()
getTimeouts in interface TimeoutableTimeoutable,
Timeouts,
setTimeouts(org.netbeans.jemmy.Timeouts)public void setOutput(TestOut out)
setOutput in interface Outputableout - Identify the streams or writers used for print output.Outputable,
TestOut,
getOutput()public TestOut getOutput()
getOutput in interface OutputableOutputable,
TestOut,
setOutput(org.netbeans.jemmy.TestOut)
public java.lang.Object waitAction(java.lang.Object waitableObject)
throws java.lang.InterruptedException
waitableObject - Object to be passed into actionProduced method.
TimeoutExpiredException
java.lang.InterruptedExceptionpublic java.lang.Object actionProduced(java.lang.Object obj)
Waitable
actionProduced in interface Waitableobj -
Waitablepublic java.lang.String getDescription()
Waitable
getDescription in interface WaitableWaitableprotected java.lang.String getWaitingStartedMessage()
protected java.lang.String getTimeoutExpiredMessage(long timeSpent)
timeSpent - time from waiting start (milliseconds)
protected java.lang.String getActionProducedMessage(long timeSpent,
java.lang.Object result)
timeSpent - time from waiting start (milliseconds)result - result of Waitable.actionproduced method.
protected java.lang.String getGoldenWaitingStartedMessage()
protected java.lang.String getGoldenTimeoutExpiredMessage()
protected java.lang.String getGoldenActionProducedMessage()
protected long timeFromStart()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||