public class RateLimitException extends APIException
Getters for limit, remaining and reset corresponds to X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset HTTP headers.
If the value of any headers is missing, then a default value -1 will be assigned.
To learn more about rate limits, visit https://api.reloadly.com/docs/policies/rate-limits
| Constructor and Description |
|---|
RateLimitException(String message,
String path,
int httpStatusCode,
String errorCode) |
RateLimitException(String message,
String path,
int httpStatusCode,
String errorCode,
List<Object> details) |
| Modifier and Type | Method and Description |
|---|---|
long |
getExpectedResetTimestamp()
Getter for the UNIX timestamp of the expected time when the rate limit will reset.
|
long |
getLimit()
Getter for the maximum number of requests available in the current time frame.
|
long |
getRemaining()
Getter for the number of remaining requests in the current time frame.
|
void |
setExpectedResetTimestamp(long expectedResetTimestamp) |
void |
setLimit(long limit) |
void |
setRemaining(long remaining) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic RateLimitException(String message, String path, int httpStatusCode, String errorCode)
public long getLimit()
public void setLimit(long limit)
public long getRemaining()
public void setRemaining(long remaining)
public long getExpectedResetTimestamp()
public void setExpectedResetTimestamp(long expectedResetTimestamp)
Copyright © 2022. All rights reserved.