Package org.jclouds.b2.filters
Class B2RetryHandler
- java.lang.Object
-
- org.jclouds.http.handlers.BackoffLimitedRetryHandler
-
- org.jclouds.b2.filters.B2RetryHandler
-
- All Implemented Interfaces:
HttpRequestFilter,HttpRetryHandler,IOExceptionRetryHandler
public final class B2RetryHandler extends BackoffLimitedRetryHandler implements HttpRequestFilter
-
-
Field Summary
-
Fields inherited from class org.jclouds.http.handlers.BackoffLimitedRetryHandler
INSTANCE
-
Fields inherited from interface org.jclouds.http.HttpRetryHandler
ALWAYS_RETRY, NEVER_RETRY
-
Fields inherited from interface org.jclouds.http.IOExceptionRetryHandler
ALWAYS_RETRY, NEVER_RETRY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpRequestfilter(HttpRequest request)booleanshouldRetryRequest(HttpCommand command, HttpResponse response)Return true if the command should be retried.-
Methods inherited from class org.jclouds.http.handlers.BackoffLimitedRetryHandler
imposeBackoffExponentialDelay, imposeBackoffExponentialDelay, imposeBackoffExponentialDelay, shouldRetryRequest
-
-
-
-
Method Detail
-
filter
public HttpRequest filter(HttpRequest request) throws HttpException
- Specified by:
filterin interfaceHttpRequestFilter- Throws:
HttpException
-
shouldRetryRequest
public boolean shouldRetryRequest(HttpCommand command, HttpResponse response)
Description copied from interface:HttpRetryHandlerReturn true if the command should be retried. This method should only be invoked when the response has failed with a HTTP 5xx error indicating a server-side error.- Specified by:
shouldRetryRequestin interfaceHttpRetryHandler- Overrides:
shouldRetryRequestin classBackoffLimitedRetryHandler
-
-