Class MissingURIRecorder

  • All Implemented Interfaces:
    Observer

    public class MissingURIRecorder
    extends URIObserver
    This class handles recordings of URIs not found during URI lookup.
    • Constructor Detail

      • MissingURIRecorder

        public MissingURIRecorder()
    • 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 class URIObserver
        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.