Package org.apache.juneau.http.header
Class RetryAfter
java.lang.Object
org.apache.juneau.http.header.HttpHeaderBean
org.apache.juneau.http.header.RetryAfter
- All Implemented Interfaces:
HttpHeader
Represents an HTTP Retry-After header.
Delay before retrying, as a delta-seconds integer or an HTTP-date.
See Also:
- Since:
- 9.2.1
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRetryAfter(Integer value) Constructor with delay seconds.RetryAfter(String value) Constructor with a wire string (integer or HTTP-date).RetryAfter(ZonedDateTime value) Constructor with an HTTP-date.RetryAfter(Supplier<?> valueSupplier) Constructor with a lazy supplier ofIntegerorZonedDateTime. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the header value, ornull if the header has no value.static RetryAfterstatic RetryAfterstatic RetryAfterof(ZonedDateTime value) static RetryAfterMethods inherited from class org.apache.juneau.http.header.HttpHeaderBean
equals, equalsIgnoreCase, getName, hashCode, of, of, toString
-
Field Details
-
NAME
The header name- See Also:
-
-
Constructor Details
-
RetryAfter
Constructor with delay seconds.- Parameters:
value- Seconds to wait. May benull .
-
RetryAfter
Constructor with a wire string (integer or HTTP-date).- Parameters:
value- The header value. May benull .
-
RetryAfter
Constructor with a lazy supplier ofIntegerorZonedDateTime.- Parameters:
valueSupplier- Supplier for the value. Must not benull .
-
RetryAfter
Constructor with an HTTP-date.- Parameters:
value- The retry time. May benull .
-
-
Method Details
-
asInteger
- Returns:
- The value as seconds when encoded as a delta-seconds integer.
-
asZonedDateTime
- Returns:
- The value as
ZonedDateTimewhen encoded as an HTTP-date.
-
getValue
Description copied from interface:HttpHeaderReturns the header value, ornull if the header has no value.- Specified by:
getValuein interfaceHttpHeader- Overrides:
getValuein classHttpHeaderBean- Returns:
- The header value, possibly
null .
-
of
- Parameters:
value- Delay seconds. May benull , in which casenull is returned.- Returns:
- A new instance, or
null ifvalue isnull .
-
of
- Parameters:
value- Wire string. May benull , in which casenull is returned.- Returns:
- A new instance, or
null ifvalue isnull .
-
of
- Parameters:
valueSupplier- Supplier ofIntegerorZonedDateTime. Must not benull .- Returns:
- A new instance. Never
null .
-
of
- Parameters:
value- HTTP-date. May benull , in which casenull is returned.- Returns:
- A new instance, or
null ifvalue isnull .
-