Class UnavailableUrls
java.lang.Object
org.codice.ddf.platform.util.http.UnavailableUrls
/** 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a URL to the set of unavailable URL's.booleanDoes the set contain a specified URL.intint
-
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
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
Does the set contain a specified URL.- Parameters:
url- of the endpoint to ping- Returns:
- the truth
-