uk.org.ogsadai.engine
Class RequestEngineObserver

java.lang.Object
  |
  +--uk.org.ogsadai.engine.RequestEngineObserver
All Implemented Interfaces:
java.util.Observer

public class RequestEngineObserver
extends java.lang.Object
implements java.util.Observer

Oberver class for monitoring instances of RequestEngine for events relating to request processing (e.g. request submission, queueing and completion).

Replaces earlier use of a StatusObserver attached to the Status object in EngineConfiguration.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  RequestEngine mEngine
          Engine being monitored
private  boolean mWaiting
          Is the engine currently being monitored?
 
Constructor Summary
RequestEngineObserver(RequestEngine engine)
          Create an observer for an engine.
 
Method Summary
 void reset()
          Reset the observer.
 void update(java.util.Observable engine, java.lang.Object load)
           
 void waitForEngine()
          Deprecated. should use waitUntilProcessing instead
 void waitUntilFlushed(Request request)
          Wait until the engine dequeues a request or stops processing a request.
 void waitUntilIdle()
          Wait until both the active and latent loads on the engine are zero.
 void waitUntilProcessing(Request request)
          Wait until the engine starts processing a request.
 void waitUntilQueued(Request request)
          Wait until the engine queues request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

mWaiting

private boolean mWaiting
Is the engine currently being monitored?


mEngine

private RequestEngine mEngine
Engine being monitored

Constructor Detail

RequestEngineObserver

public RequestEngineObserver(RequestEngine engine)
Create an observer for an engine.

Parameters:
engine - Engine to observe.
Method Detail

update

public void update(java.util.Observable engine,
                   java.lang.Object load)
Specified by:
update in interface java.util.Observer

reset

public void reset()
Reset the observer.


waitForEngine

public void waitForEngine()
Deprecated. should use waitUntilProcessing instead


waitUntilProcessing

public void waitUntilProcessing(Request request)
Wait until the engine starts processing a request.

Parameters:
request - Request that is being waited upon.

waitUntilQueued

public void waitUntilQueued(Request request)
Wait until the engine queues request.

Parameters:
request - Request that is being waited upon.

waitUntilFlushed

public void waitUntilFlushed(Request request)
Wait until the engine dequeues a request or stops processing a request.

Parameters:
request - Request that is being waited upon.

waitUntilIdle

public void waitUntilIdle()
Wait until both the active and latent loads on the engine are zero.