Package com.boomi.common.rest
Class RestRetryHandler
- java.lang.Object
-
- com.boomi.common.rest.RestRetryHandler
-
- All Implemented Interfaces:
HttpRequestRetryHandler
public class RestRetryHandler extends Object implements HttpRequestRetryHandler
Implementation of theHttpRequestRetryHandlerthis retry is used for OAuth2 purposes to refresh the token before retrying the request once again.
-
-
Constructor Summary
Constructors Constructor Description RestRetryHandler()RestRetryHandler(int maxRetries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanretryRequest(IOException exception, int executionCount, HttpContext context)
-
-
-
Method Detail
-
retryRequest
public boolean retryRequest(IOException exception, int executionCount, HttpContext context)
- Specified by:
retryRequestin interfaceHttpRequestRetryHandler- Parameters:
exception- failureReasonexecutionCount- number of retries executedcontext- HttpContext generated for request- Returns:
- Returns true if the Exception is of HttpAuthenticationException and the maxRetries <= 2. returns false otherwise.
-
-