uk.org.ogsadai.engine
Class StatusToStatusObserver

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

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

An Observer that updates the state of a destination ProcessingStatus object to match that of a source ProcessingStatus object whenever the source state changes. An instance should be attached to the source ProcessingStatus object.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement.
private  ProcessingStatus mDestinationStatus
          The processing status to update.
 
Constructor Summary
StatusToStatusObserver(ProcessingStatus destStatus)
          Creates a new observer that will update the specified destination ProcessingStatus state whenever an invocation of the update method is received.
 
Method Summary
 void update(java.util.Observable sourceStatus, java.lang.Object argument)
           
 
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

mDestinationStatus

private final ProcessingStatus mDestinationStatus
The processing status to update.

Constructor Detail

StatusToStatusObserver

public StatusToStatusObserver(ProcessingStatus destStatus)
Creates a new observer that will update the specified destination ProcessingStatus state whenever an invocation of the update method is received.

Parameters:
destStatus - the destination ProcessingStatus object that will be updated whenever the source ProcessingStatus changes state
Throws:
java.lang.IllegalArgumentException - if destStatus is null.
Method Detail

update

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