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
public class RetryAfterException extends RuntimeException
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 a503
status code, as specified in theHttpHeaders#RETRY_AFTER
header.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RetryAfterException(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getSeconds()
Get the value of the retry time-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
RetryAfterException
public RetryAfterException(String message, int seconds)
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
public RetryAfterException(Throwable cause, int seconds)
Construct an exception instance to happen at a time in the future- Parameters:
cause
- causeseconds
- retry after delta. Negative values are converted to zero
-
-