de.cidaas.jwk.RateLimitReachedException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cidaas-interceptor-spring-security Show documentation
Show all versions of cidaas-interceptor-spring-security Show documentation
Interceptor for Cidaas Java Spring Clients
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;
}
}