
com.here.account.oauth2.retry.RetryPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of here-oauth-client Show documentation
Show all versions of here-oauth-client Show documentation
here-oauth-client is for clients of the HERE AAA, and supports OAuth2.0 grant_types=client_credentials
package com.here.account.oauth2.retry;
/**
* A {@link RetryPolicy} is responsible for providing policy and condition for retries.
*/
public interface RetryPolicy {
/**
* Decides whether retry should happen based on last response or last exception thrown.
* @param retryContext An instance of {@link RetryContext}
* @return true if retry should happen otherwise false.
*/
boolean shouldRetry(RetryContext retryContext);
/**
* Calculates wait interval after which retry should happen in milliseconds.
* @param retryContext An instance of {@link RetryContext}
* @return wait interval in milliseconds
*/
int getNextRetryIntervalMillis(RetryContext retryContext);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy