@Header(value="Retry-After") 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
|
asString, eq, eqIC, toString
public static RetryAfter forString(String value)
value
- The public Date asDate()
Date
object.Date
object, or public int asInt()
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.