Package org.forgerock.http.header
Class TrailerHeader
java.lang.Object
org.forgerock.http.protocol.Header
org.forgerock.http.header.TrailerHeader
A
Header
representation of the Trailer
HTTP response header.
This header will contain a list of header names that the user-agent will have to expect as trailing headers,
added after the response's body. This is informative only, and the actually listed trailer headers may not
be present in the end, or additional trailing headers could appear compared to the originally listed ones.
This class is not thread-safe.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddTrailers
(String... trailerNames) Add some new trailers that are expected to be received.addTrailers
(List<String> trailerNames) Add some new trailers that are expected to be received.boolean
getName()
Returns the name of the header, as it would canonically appear within an HTTP message.Returns the header as a list of strings.int
hashCode()
Methods inherited from class org.forgerock.http.protocol.Header
getFirstValue, toString
-
Field Details
-
NAME
The name of the header in the HTTP message.- See Also:
-
-
Constructor Details
-
TrailerHeader
public TrailerHeader()
-
-
Method Details
-
getName
Description copied from class:Header
Returns the name of the header, as it would canonically appear within an HTTP message. -
getValues
Description copied from class:Header
Returns the header as a list of strings. If the header has no values then it must return an empty list, never null. EachString
should represent the value component of the key-value pair that makes up the HTTP header - as such, for someHeader
implementations each String in thisList
may contain multiple token-separated values.The
List
returned from this method should not be expected to be mutable. However, some subclasses ofHeader
may choose to implement it as such. -
addTrailers
Add some new trailers that are expected to be received.- Parameters:
trailerNames
- the names of the trailers- Returns:
- the header itself to be able to chain method calls.
-
addTrailers
Add some new trailers that are expected to be received.- Parameters:
trailerNames
- the names of the trailers- Returns:
- the header itself to be able to chain method calls.
-
equals
-
hashCode
public int hashCode()
-