Package com.amilesend.client.connection
Class ThrottledException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.amilesend.client.connection.ConnectionException
com.amilesend.client.connection.RequestException
com.amilesend.client.connection.ThrottledException
- All Implemented Interfaces:
Serializable
Defines the exception thrown from
Connection
when a request is throttled.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionThrottledException
(String msg, Long retryAfterSeconds) Creates a newThrottledException
. -
Method Summary
Modifier and TypeMethodDescriptionThe time in seconds that the request can be retried.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ThrottledException
Creates a newThrottledException
.- Parameters:
msg
- the exception messageretryAfterSeconds
- the amount of time in seconds that the request can be retried
-
-
Method Details
-
getRetryAfterSeconds
The time in seconds that the request can be retried. Note: This can be null and is optionally provided by the response.
-