Class StandardServiceUnavailableRetryStrategy
- java.lang.Object
-
- org.apache.maven.wagon.shared.http.StandardServiceUnavailableRetryStrategy
-
- All Implemented Interfaces:
org.apache.http.client.ServiceUnavailableRetryStrategy
@Contract(threading=IMMUTABLE) public class StandardServiceUnavailableRetryStrategy extends java.lang.Object implements org.apache.http.client.ServiceUnavailableRetryStrategyAn implementation of theServiceUnavailableRetryStrategyinterface. that retries408(Request Timeout),429(Too Many Requests), and500(Server side error) responses for a fixed number of times at a fixed interval.
-
-
Field Summary
Fields Modifier and Type Field Description private intmaxRetriesMaximum number of allowed retries if the server responds with a HTTP code in our retry code list.private longretryIntervalRetry interval between subsequent requests, in milliseconds.
-
Constructor Summary
Constructors Constructor Description StandardServiceUnavailableRetryStrategy(int maxRetries, int retryInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetRetryInterval()booleanretryRequest(org.apache.http.HttpResponse response, int executionCount, org.apache.http.protocol.HttpContext context)
-
-
-
Method Detail
-
retryRequest
public boolean retryRequest(org.apache.http.HttpResponse response, int executionCount, org.apache.http.protocol.HttpContext context)- Specified by:
retryRequestin interfaceorg.apache.http.client.ServiceUnavailableRetryStrategy
-
getRetryInterval
public long getRetryInterval()
- Specified by:
getRetryIntervalin interfaceorg.apache.http.client.ServiceUnavailableRetryStrategy
-
-