Package org.jclouds.rest
Class RetryAfterException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.jclouds.rest.RetryAfterException
- All Implemented Interfaces:
Serializable
This exception is raised when an http endpoint returns with a response
telling the caller to make the same request after a certain period of time.
Typically, this is returned with a
header.
503
status code, as specified in
the
invalid reference
HttpHeaders#RETRY_AFTER
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRetryAfterException
(String message, int seconds) Construct an exception instance to happen at a time in the futureRetryAfterException
(String message, Throwable cause, int seconds) Construct an exception instance to happen at a time in the futureRetryAfterException
(Throwable cause, int seconds) Construct an exception instance to happen at a time in the future -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RetryAfterException
Construct an exception instance to happen at a time in the future- Parameters:
message
- messageseconds
- retry after delta. Negative values are converted to zero
-
RetryAfterException
Construct an exception instance to happen at a time in the future- Parameters:
cause
- causeseconds
- retry after delta. Negative values are converted to zero
-
RetryAfterException
Construct an exception instance to happen at a time in the future- Parameters:
message
- messagecause
- causeseconds
- retry after delta. Negative values are converted to zero
-
-
Method Details
-
getSeconds
public int getSeconds()Get the value of the retry time- Returns:
- the retry time, in seconds. This is always zero or positive.
-