Package com.gooddata.retry
Class GetServerErrorRetryStrategy
- java.lang.Object
-
- com.gooddata.retry.GetServerErrorRetryStrategy
-
- All Implemented Interfaces:
RetryStrategy
public class GetServerErrorRetryStrategy extends Object implements RetryStrategy
Allows retry for GET method and some HTTP 5XX states mentioned inRETRYABLE_STATES.
-
-
Field Summary
Fields Modifier and Type Field Description static Collection<String>RETRYABLE_METHODSstatic Collection<Integer>RETRYABLE_STATES
-
Constructor Summary
Constructors Constructor Description GetServerErrorRetryStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanretryAllowed(String method, int statusCode, URI uri)Method says if retry is allowed for given parameter combination.
-
-
-
Field Detail
-
RETRYABLE_STATES
public static final Collection<Integer> RETRYABLE_STATES
-
RETRYABLE_METHODS
public static final Collection<String> RETRYABLE_METHODS
-
-
Method Detail
-
retryAllowed
public boolean retryAllowed(String method, int statusCode, URI uri)
Description copied from interface:RetryStrategyMethod says if retry is allowed for given parameter combination.- Specified by:
retryAllowedin interfaceRetryStrategy- Parameters:
method- HTTP methodstatusCode- HTTP response codeuri- requested URL- Returns:
trueit retry is allowed
-
-