Interface OutboundHeaders<A extends OutboundHeaders<A>>
- Type Parameters:
A
- the outbound headers type
- All Superinterfaces:
InboundHeaders
- All Known Subinterfaces:
OutboundRequestHeaders
,OutboundResponseHeaders
Represents mutable outbound HTTP headers.
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionAdds the specified headers.add
(CharSequence name, CharSequence value) Adds a header with the specified name and value.<T> A
addParameter
(CharSequence name, T value) Encodes and adds a header with the specified name and valuedefault <T> A
addParameter
(CharSequence name, T value, Class<T> type) Encodes and adds a header with the specified name and value<T> A
addParameter
(CharSequence name, T value, Type type) Encodes and adds a header with the specified name and valueboolean
Determines whether the headers have been sent to the recipient.remove
(CharSequence... names) Removes the headers with the specified names.Sets the specified headers.set
(CharSequence name, CharSequence value) Sets the value of the header with the specified name.<T> A
setParameter
(CharSequence name, T value) Encodes and sets the value of the header with the specified name.default <T> A
setParameter
(CharSequence name, T value, Class<T> type) Encodes and sets the value of the header with the specified name.<T> A
setParameter
(CharSequence name, T value, Type type) Encodes and sets the value of the header with the specified name.Methods inherited from interface io.inverno.mod.http.base.InboundHeaders
contains, contains, get, getAll, getAll, getAllHeader, getAllHeader, getAllParameter, getAllParameter, getHeader, getNames, getParameter
-
Method Details
-
isWritten
boolean isWritten()Determines whether the headers have been sent to the recipient.
Any attempts to specify new headers once headers have been sent, will result in an
IllegalStateException
being thrown.- Returns:
- true if the headers have been sent, false otherwise
-
add
Adds a header with the specified name and value.
- Parameters:
name
- the header namevalue
- the header value- Returns:
- the outbound headers
-
addParameter
Encodes and adds a header with the specified name and value
- Type Parameters:
T
- the value type- Parameters:
name
- the header namevalue
- the header value- Returns:
- the outbound headers
-
addParameter
Encodes and adds a header with the specified name and value
- Type Parameters:
T
- the value type- Parameters:
name
- the header namevalue
- the header valuetype
- the value type- Returns:
- the outbound headers
-
addParameter
Encodes and adds a header with the specified name and value
- Type Parameters:
T
- the value type- Parameters:
name
- the header namevalue
- the header valuetype
- the value type- Returns:
- the outbound headers
-
add
Adds the specified headers.
- Parameters:
headers
- the headers to add- Returns:
- the outbound headers
-
set
Sets the value of the header with the specified name.
- Parameters:
name
- the header namevalue
- the header value- Returns:
- the outbound headers
-
setParameter
Encodes and sets the value of the header with the specified name.
- Type Parameters:
T
- the value type- Parameters:
name
- the header namevalue
- the header value- Returns:
- the outbound headers
-
setParameter
Encodes and sets the value of the header with the specified name.
- Type Parameters:
T
- the value type- Parameters:
name
- the header namevalue
- the header valuetype
- the value type- Returns:
- the outbound headers
-
setParameter
Encodes and sets the value of the header with the specified name.
- Type Parameters:
T
- the value type- Parameters:
name
- the header namevalue
- the header valuetype
- the value type- Returns:
- the outbound headers
-
set
Sets the specified headers.
- Parameters:
headers
- the headers to set- Returns:
- the outbound headers
-
remove
Removes the headers with the specified names.
- Parameters:
names
- the names of the headers to remove- Returns:
- the outbound headers
-