public final class DelegatingRequestMatcherHeaderWriter extends Object implements HeaderWriter
HeaderWriter
when
RequestMatcher.matches(HttpServletRequest)
returns true.Constructor and Description |
---|
DelegatingRequestMatcherHeaderWriter(RequestMatcher requestMatcher,
HeaderWriter delegateHeaderWriter)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
String |
toString() |
void |
writeHeaders(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Create a
Header instance. |
public DelegatingRequestMatcherHeaderWriter(RequestMatcher requestMatcher, HeaderWriter delegateHeaderWriter)
requestMatcher
- the RequestMatcher
to use. If returns true, the
delegateHeaderWriter will be invoked.delegateHeaderWriter
- the HeaderWriter
to invoke if the
RequestMatcher
returns true.public void writeHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
HeaderWriter
Header
instance.writeHeaders
in interface HeaderWriter
request
- the requestresponse
- the response