Package org.netbeans.jemmy
Class Timeout
java.lang.Object
org.netbeans.jemmy.Timeout
Represents one timeout.
- Author:
- Alexandre Iline (alexandre.iline@sun.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
check()
Throws a TimeoutExpiredException exception if timeout has been expired.boolean
expired()
Checks if timeout has been expired after start() invocation.getName()
Returns timeout name.long
getValue()
Returns timeout value.void
sleep()
Sleeps for timeout value.void
start()
Starts timeout measuring.
-
Constructor Details
-
Timeout
Constructor.- Parameters:
name
- Timeout name.value
- Timeout value in milliseconds.
-
-
Method Details
-
getName
Returns timeout name.- Returns:
- timeout name.
-
getValue
public long getValue()Returns timeout value.- Returns:
- timeout value.
-
sleep
public void sleep()Sleeps for timeout value. -
start
public void start()Starts timeout measuring. -
expired
public boolean expired()Checks if timeout has been expired after start() invocation.- Returns:
- true if timeout has been expired.
-
check
public void check()Throws a TimeoutExpiredException exception if timeout has been expired.- Throws:
TimeoutExpiredException
- if timeout has been expired after start() invocation.
-