All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.here.account.oauth2.retry.RetryPolicy Maven / Gradle / Ivy

Go to download

here-oauth-client is for clients of the HERE AAA, and supports OAuth2.0 grant_types=client_credentials

There is a newer version: 0.4.9
Show newest version
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