public final class DelegatingRequestMatcherHeaderWriter extends java.lang.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 |
---|---|
java.lang.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 responsepublic java.lang.String toString()
toString
in class java.lang.Object