Module io.inverno.mod.http.base
Package io.inverno.mod.http.base
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.boolean
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.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
-
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
-
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
-