dk.netarkivet.viewerproxy
Class URIObserver

java.lang.Object
  extended by dk.netarkivet.viewerproxy.URIObserver
All Implemented Interfaces:
java.util.Observer
Direct Known Subclasses:
MissingURIRecorder

public abstract class URIObserver
extends java.lang.Object
implements java.util.Observer

Super class for all URIObservers - calls the URIObserver notify method on all notifications of a URI and its response code.


Nested Class Summary
(package private) static class URIObserver.URIResponseCodePair
          Helper class to be able to notify about a pair of .
 
Constructor Summary
URIObserver()
           
 
Method Summary
abstract  void notify(java.net.URI uri, int responseCode)
          This notify method is called on every notification of URI and response code.
 void update(java.util.Observable o, java.lang.Object arg)
          Will call the abstract notify method if arg is an URIResponseCodePair value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIObserver

public URIObserver()
Method Detail

notify

public abstract void notify(java.net.URI uri,
                            int responseCode)
This notify method is called on every notification of URI and response code.

Parameters:
uri - The uri notified about
responseCode - The response code of this uri.

update

public final void update(java.util.Observable o,
                         java.lang.Object arg)
Will call the abstract notify method if arg is an URIResponseCodePair value.

Specified by:
update in interface java.util.Observer
Parameters:
o - The observable which called this method. Ignored.
arg - The argument. If Response instance, notify is called. Otherwise ignored.