Package org.jclouds.aws.handlers
Class AWSClientErrorRetryHandler
- java.lang.Object
-
- org.jclouds.aws.handlers.AWSClientErrorRetryHandler
-
- All Implemented Interfaces:
HttpRetryHandler
- Direct Known Subclasses:
SQSErrorRetryHandler
public class AWSClientErrorRetryHandler extends Object implements HttpRetryHandler
Handles Retryable responses with error codes in the 4xx range
-
-
Field Summary
-
Fields inherited from interface org.jclouds.http.HttpRetryHandler
ALWAYS_RETRY, NEVER_RETRY
-
-
Constructor Summary
Constructors Constructor Description AWSClientErrorRetryHandler(AWSUtils utils, BackoffLimitedRetryHandler backoffLimitedRetryHandler, Set<String> retryableCodes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
shouldRetryRequest(HttpCommand command, HttpResponse response)
Return true if the command should be retried.protected boolean
shouldRetryRequestOnError(HttpCommand command, HttpResponse response, AWSError error)
-
-
-
Constructor Detail
-
AWSClientErrorRetryHandler
@Inject public AWSClientErrorRetryHandler(AWSUtils utils, BackoffLimitedRetryHandler backoffLimitedRetryHandler, Set<String> retryableCodes)
-
-
Method Detail
-
shouldRetryRequest
public boolean shouldRetryRequest(HttpCommand command, HttpResponse response)
Description copied from interface:HttpRetryHandler
Return 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:
shouldRetryRequest
in interfaceHttpRetryHandler
-
shouldRetryRequestOnError
protected boolean shouldRetryRequestOnError(HttpCommand command, HttpResponse response, AWSError error)
-
-