Package dk.netarkivet.viewerproxy
Class MissingURIRecorder
- java.lang.Object
-
- dk.netarkivet.viewerproxy.URIObserver
-
- dk.netarkivet.viewerproxy.MissingURIRecorder
-
- All Implemented Interfaces:
Observer
public class MissingURIRecorder extends URIObserver
This class handles recordings of URIs not found during URI lookup.
-
-
Constructor Summary
Constructors Constructor Description MissingURIRecorder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearRecordedURIs()
Clear list of missing URIs.Set<URI>
getRecordedURIs()
Getter for the recorded missing URIs.boolean
isRecordingURIs()
Returns whether we are currently collecting URIs.void
notify(URI uri, int responseCode)
If we are recording URIs, and the response code is NOT_FOUND, then add URI to the list of missing URIs.void
startRecordingURIs()
Start recording missing URIs.void
stopRecordingURIs()
Stop recording missing URIs.-
Methods inherited from class dk.netarkivet.viewerproxy.URIObserver
update
-
-
-
-
Method Detail
-
startRecordingURIs
public void startRecordingURIs()
Start recording missing URIs.
-
stopRecordingURIs
public void stopRecordingURIs()
Stop recording missing URIs.
-
clearRecordedURIs
public void clearRecordedURIs()
Clear list of missing URIs.
-
getRecordedURIs
public Set<URI> getRecordedURIs()
Getter for the recorded missing URIs.- Returns:
- the recorded URIs, as a sorted set. Note that this is the primary copy, so don't modify it!
-
notify
public void notify(URI uri, int responseCode)
If we are recording URIs, and the response code is NOT_FOUND, then add URI to the list of missing URIs.- Specified by:
notify
in classURIObserver
- Parameters:
uri
- The URI observed.responseCode
- The responsecode of the uri.
-
isRecordingURIs
public boolean isRecordingURIs()
Returns whether we are currently collecting URIs.- Returns:
- True if we are currently collecting URIs.
-
-