@Beta public final class HeaderToRetryAfterException extends Object implements PropagateIfRetryAfter
RetryAfterException
if a Throwable is an
HttpResponseException
with a set
and a valid
HttpHeaders.RETRY_AFTER
header set.Modifier and Type | Method and Description |
---|---|
Void |
apply(Throwable in) |
static HeaderToRetryAfterException |
create(com.google.common.base.Ticker ticker,
DateCodec dateCodec) |
com.google.common.base.Optional<RetryAfterException> |
tryCreateRetryAfterException(Throwable in,
String retryAfter)
returns a
RetryAfterException if parameter retryAfter
corresponds to known formats. |
public static HeaderToRetryAfterException create(com.google.common.base.Ticker ticker, DateCodec dateCodec)
ticker
- how to read current timedateParser
- how to parse the HttpHeaders.RETRY_AFTER
header, if it
is a Date.public com.google.common.base.Optional<RetryAfterException> tryCreateRetryAfterException(Throwable in, String retryAfter)
RetryAfterException
if parameter retryAfter
corresponds to known formats.Copyright © 2009-2013 jclouds. All Rights Reserved.