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

de.cidaas.jwk.RateLimitReachedException Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
package de.cidaas.jwk;



@SuppressWarnings("WeakerAccess")
public class RateLimitReachedException extends JwkException {
    private final long availableInMs;

    public RateLimitReachedException(long availableInMs) {
        super(String.format("The Rate Limit has been reached! Please wait %d milliseconds.", availableInMs));
        this.availableInMs = availableInMs;
    }

    /**
     * Returns the delay in which the jwk request can be retried.
     *
     * @return the time to wait in milliseconds before retrying the request.
     */
    public long getAvailableIn() {
        return availableInMs;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy