Package com.fullcontact.apilib.retry
Class DefaultRetryHandler
- java.lang.Object
-
- com.fullcontact.apilib.retry.DefaultRetryHandler
-
- All Implemented Interfaces:
RetryHandler
public class DefaultRetryHandler extends java.lang.Object implements RetryHandler
-
-
Constructor Summary
Constructors Constructor Description DefaultRetryHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetRetryAttempts()Specifies Number of Retry Attempts allowedintgetRetryDelayMillis()Specifies Delay time in milliseconds before each retrybooleanshouldRetry(int responseCode)Specifies retry condition based on status code of response
-
-
-
Method Detail
-
shouldRetry
public boolean shouldRetry(int responseCode)
Description copied from interface:RetryHandlerSpecifies retry condition based on status code of response- Specified by:
shouldRetryin interfaceRetryHandler- Parameters:
responseCode- Response status code- Returns:
- boolean condition for retry
-
getRetryAttempts
public int getRetryAttempts()
Description copied from interface:RetryHandlerSpecifies Number of Retry Attempts allowed- Specified by:
getRetryAttemptsin interfaceRetryHandler- Returns:
- int: Number of retry attempts
-
getRetryDelayMillis
public int getRetryDelayMillis()
Description copied from interface:RetryHandlerSpecifies Delay time in milliseconds before each retry- Specified by:
getRetryDelayMillisin interfaceRetryHandler- Returns:
- int: Delay time in milliseconds
-
-