uk.org.ogsadai.engine
  Class ProcessingStatusObserver
  
java.lang.Object
  |
  +--uk.org.ogsadai.engine.ProcessingStatusObserver
  
    - All Implemented Interfaces:
- java.util.Observer
  
    - public class ProcessingStatusObserver
- extends java.lang.Object
- implements java.util.Observer
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.
  
  
  
    - Author:
- The OGSA-DAI Project Team
  
  
    
      | Field Summary | 
    
      | private static java.lang.String | COPYRIGHT_NOTICECopyright statement
 | 
    
      | private  boolean | mInitialisingIndicates whether or not the status being observed has been set to initialising.
 | 
    
      | private  boolean | mProcessingIndicates whether or not the status being observed has been set to processing.
 | 
    
      | private  boolean | mWaitingIndicates whether or not to continue waiting until the status being observed is set to a terminal state (completed, timed out or error).
 | 
  
  
    
  
    
      | Method Summary | 
    
      |  void | reset()Resets the
 ProcessingStatusObserverready for thewaitForCompletion,waitForInitialisationandwaitForProcessingmethods 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
 ObservableStatusis updated to a status that indicates a finished state or the processing thread is interupted. | 
    
      |  void | waitForInitialisation()Blocks until the
 ProcessingStatusis updated to a status that indicates initialisation has commenced, or until the processing thread is interupted. | 
    
      |  void | waitForProcessing()Blocks until the
 ProcessingStatusis 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 | 
  
 
  
  
  COPYRIGHT_NOTICE
  
private static final java.lang.String COPYRIGHT_NOTICE
  
    - 
      Copyright statement
      
      
        - See Also:
- Constant Field Values
 
  
  mWaiting
  
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).
      
      
 
  
  mInitialising
  
private boolean mInitialising
  
    - 
      Indicates whether or not the status being observed has been set to initialising.
      
      
 
  
  mProcessing
  
private boolean mProcessing
  
    - 
      Indicates whether or not the status being observed has been set to processing.
      
      
 
ProcessingStatusObserver
  
public ProcessingStatusObserver()
  
update
  
public void update(java.util.Observable status,
                   java.lang.Object owner)
  
    - 
      Called by the Engine whenever the request status changes.
      
    
- 
      
        - Specified by:
- updatein interface- java.util.Observer
 
- 
      
        - Parameters:
- status- An- Objectreference to the- ProcessingStatusobject that has been updated.
- owner- An- Objectreference to the object for which- statusacts status.
 
  
  reset
  
public void reset()
  
    - 
      Resets the ProcessingStatusObserverready for thewaitForCompletion,waitForInitialisationandwaitForProcessingmethods to be used again.
- 
      
 
- 
      
 
  
  waitForCompletion
  
public void waitForCompletion()
  
    - 
      Blocks until the ObservableStatusis updated to a status that indicates a finished state or the processing thread is interupted. After this method has returned, theresetmethod should be invoked before any ofwaitForInitialisation,waitForProcessingandwaitForCompletionare used again.
- 
      
 
- 
      
 
  
  waitForInitialisation
  
public void waitForInitialisation()
  
    - 
      Blocks until the ProcessingStatusis updated to a status that indicates initialisation has commenced, or until the processing thread is interupted. After this method has returned, theresetmethod should be invoked before any ofwaitForInitialisation,waitForProcessingandwaitForCompletionare used again.
- 
      
 
- 
      
 
  
  waitForProcessing
  
public void waitForProcessing()
  
    - 
      Blocks until the ProcessingStatusis updated to a status that indicates processing has commenced, or until the processing thread is interupted. After this method has returned, theresetmethod should be invoked before any ofwaitForInitialisation,waitForProcessingandwaitForCompletionare used again.
- 
      
 
-