|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.engine.ProcessingStatusObserver
This is an Observer
that can be registered with a
ProcessingStatus
then used to wait until the status changes
to a finished state. A finished status is one in which the
ProcessingStatus.isFinished()
method returns true
.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private boolean |
mInitialising
Indicates whether or not the status being observed has been set to initialising. |
private boolean |
mProcessing
Indicates whether or not the status being observed has been set to processing. |
private boolean |
mWaiting
Indicates whether or not to continue waiting until the status being observed is set to a terminal state (completed, timed out or error). |
Constructor Summary | |
ProcessingStatusObserver()
|
Method Summary | |
void |
reset()
Resets the ProcessingStatusObserver ready for the
waitForCompletion ,waitForInitialisation and
waitForProcessing methods to be used again. |
void |
update(java.util.Observable status,
java.lang.Object owner)
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. |
void |
waitForInitialisation()
Blocks until the ProcessingStatus is updated to a
status that indicates initialisation has commenced, or until
the processing thread is interupted. |
void |
waitForProcessing()
Blocks until the ProcessingStatus is updated to a
status that indicates processing has commenced, or until 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
private boolean mInitialising
private boolean mProcessing
Constructor Detail |
public ProcessingStatusObserver()
Method Detail |
public void update(java.util.Observable status, java.lang.Object owner)
update
in interface java.util.Observer
status
- An Object
reference to the
ProcessingStatus
object that has been
updated.owner
- An Object
reference to the
object for which status
acts status.public void reset()
ProcessingStatusObserver
ready for the
waitForCompletion
,waitForInitialisation
and
waitForProcessing
methods 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 any of waitForInitialisation
,
waitForProcessing
and waitForCompletion
are
used again.
public void waitForInitialisation()
ProcessingStatus
is updated to a
status that indicates initialisation has commenced, or until
the processing thread is interupted. After this method has
returned, the reset
method should be invoked
before any of waitForInitialisation
,
waitForProcessing
and
waitForCompletion
are used again.
public void waitForProcessing()
ProcessingStatus
is updated to a
status that indicates processing has commenced, or until the
processing thread is interupted. After this method has
returned, the reset
method should be invoked
before any of waitForInitialisation
,
waitForProcessing
and
waitForCompletion
are used again.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |