Class MissingURIRecorder

  • All Implemented Interfaces:
    java.util.Observer

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clearRecordedURIs()
      Clear list of missing URIs.
      java.util.Set<java.net.URI> getRecordedURIs()
      Getter for the recorded missing URIs.
      boolean isRecordingURIs()
      Returns whether we are currently collecting URIs.
      void notify​(java.net.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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getRecordedURIs

        public java.util.Set<java.net.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​(java.net.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.