Class DelegatingRequestMatcherHeaderWriter
- java.lang.Object
-
- org.springframework.security.web.header.writers.DelegatingRequestMatcherHeaderWriter
-
- All Implemented Interfaces:
HeaderWriter
public final class DelegatingRequestMatcherHeaderWriter extends java.lang.Object implements HeaderWriter
Delegates to the providedHeaderWriter
whenRequestMatcher.matches(HttpServletRequest)
returns true.- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor Description DelegatingRequestMatcherHeaderWriter(RequestMatcher requestMatcher, HeaderWriter delegateHeaderWriter)
Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
void
writeHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Create aHeader
instance.
-
-
-
Constructor Detail
-
DelegatingRequestMatcherHeaderWriter
public DelegatingRequestMatcherHeaderWriter(RequestMatcher requestMatcher, HeaderWriter delegateHeaderWriter)
Creates a new instance- Parameters:
requestMatcher
- theRequestMatcher
to use. If returns true, the delegateHeaderWriter will be invoked.delegateHeaderWriter
- theHeaderWriter
to invoke if theRequestMatcher
returns true.
-
-
Method Detail
-
writeHeaders
public void writeHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Description copied from interface:HeaderWriter
Create aHeader
instance.- Specified by:
writeHeaders
in interfaceHeaderWriter
- Parameters:
request
- the requestresponse
- the response
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-