public final class RetryAfter extends HeaderString
If an entity is temporarily unavailable, this instructs the client to try again later. Value could be a specified period of time (in seconds) or a HTTP-date.
Retry-After: 120 Retry-After: Fri, 07 Nov 2014 23:59:59 GMT
Retry-After = "Retry-After" ":" ( HTTP-date | delta-seconds )
Two examples of its use are
Retry-After: Fri, 31 Dec 1999 23:59:59 GMT Retry-After: 120
In the latter example, the delay is 2 minutes.
Modifier and Type | Method and Description |
---|---|
Date |
asDate()
Returns this header value as a
Date object. |
int |
asInt()
Returns this header value as an integer.
|
static RetryAfter |
forString(String value)
Returns a parsed
Retry-After header. |
asString, eq, eqIC, toString
public static RetryAfter forString(String value)
Retry-After
header.value
- The Retry-After
header string.Retry-After
header, or public Date asDate()
Date
object.Date
object, or public int asInt()
-1
if the value is not an integer.Copyright © 2018 Apache. All rights reserved.