Class UnavailableUrls

java.lang.Object
org.codice.ddf.platform.util.http.UnavailableUrls

public class UnavailableUrls extends Object
/** A class to contain a set of unavailable URL's. They will be periodically checked to determine if the URL has become available. If the URL is reachable, this implies the web service is available, and the URL will be removed from the set.

NOTE: to avoid excessive network traffic, the period to wait before checking for a URL increases exponentially.

  • Constructor Details

    • UnavailableUrls

      public UnavailableUrls()
  • Method Details

    • getMaxRetryInterval

      public int getMaxRetryInterval()
      Returns:
      The maximum number of seconds to wait before pinging an unavailable URL
    • getInitialRetryInterval

      public int getInitialRetryInterval()
      Returns:
      The number of seconds to between the first and seconds attempts to contact the unavailable URL.
    • add

      public void add(String url)
      Add a URL to the set of unavailable URL's. NOTE: the URL will automatically be removed when it can be reached.
      Parameters:
      url - - no validation that the string is a valid URL
    • contains

      public boolean contains(String url)
      Does the set contain a specified URL.
      Parameters:
      url - of the endpoint to ping
      Returns:
      the truth