|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.engine.StatusObserver
This is an Observer
that can be registered with an
ObservableStatus
then used to wait until the status changes
to a finished state. A finished status is one in which the
Status.isFinished()
method returns true
.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private boolean |
mWaiting
Indicates whether or not to continue waiting. |
Constructor Summary | |
StatusObserver()
|
Method Summary | |
void |
reset()
Resets the StatusObserver ready for the
waitForCompletion method to be used again. |
void |
update(java.util.Observable observable,
java.lang.Object status)
Called by the Engine whenever the request status changes. |
void |
waitForCompletion()
Blocks until the ObservableStatus is updated to a status
that indicates a finished state or the processing thread is interupted. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private boolean mWaiting
Constructor Detail |
public StatusObserver()
Method Detail |
public void update(java.util.Observable observable, java.lang.Object status)
update
in interface java.util.Observer
observable
- An Object
reference to the
ObservableStatus
object that has been
updated.status
- An Object
reference to the
Status
object indicating the new status
of the ObservableStatus
.public void reset()
StatusObserver
ready for the
waitForCompletion
method to be used again.
public void waitForCompletion()
ObservableStatus
is updated to a status
that indicates a finished state or the processing thread is interupted.
After this method has returned, the reset
method should be
invoked before waitForCompletion
is used again.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |