public class StaticHeadersWriter extends java.lang.Object implements HeaderWriter
HeaderWriter
implementation which writes the same Header
instance.Constructor and Description |
---|
StaticHeadersWriter(java.util.List<Header> headers)
Creates a new instance
|
StaticHeadersWriter(java.lang.String headerName,
java.lang.String... headerValues)
Creates a new instance with a single header
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString() |
void |
writeHeaders(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Create a
Header instance. |
public StaticHeadersWriter(java.util.List<Header> headers)
headers
- the Header
instances to usepublic StaticHeadersWriter(java.lang.String headerName, java.lang.String... headerValues)
headerName
- the name of the headerheaderValues
- the values for the headerpublic void writeHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
HeaderWriter
Header
instance.writeHeaders
in interface HeaderWriter
request
- the requestresponse
- the responsepublic java.lang.String toString()
toString
in class java.lang.Object