|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.swing.lock.ScreenLock
@ThreadSafe public final class ScreenLock
Understands a lock that each GUI test should acquire before being executed, to guarantee sequential execution of GUI tests and to prevent GUI tests from blocking each other.
| Method Summary | |
|---|---|
void |
acquire(Object newOwner)
Acquires this lock. |
boolean |
acquired()
Indicates whether this lock is already acquired. |
boolean |
acquiredBy(Object possibleOwner)
Indicates whether this lock was acquired by the given object. |
static ScreenLock |
instance()
Returns the singleton instance of this class. |
void |
release(Object currentOwner)
Releases this lock. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void acquire(Object newOwner)
newOwner - the new owner of the lock.public void release(Object currentOwner)
currentOwner - the current owner of the lock.
ScreenLockException - if the lock has not been previously acquired.
ScreenLockException - if the given owner is not the same as the current owner of the lock.public boolean acquiredBy(Object possibleOwner)
possibleOwner - the given object, which could be owning the lock.
true if the given object is owning the lock; false otherwise.public boolean acquired()
true if the lock is already acquired; false otherwise.acquiredBy(Object)public static ScreenLock instance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||