C
- The type of the context that the match method actually needs to use. Can be
an ApplicationContext
or a class of an existing bean
.public abstract class ApplicationContextRequestMatcher<C> extends Object implements org.springframework.security.web.util.matcher.RequestMatcher
ApplicationContext
backed RequestMatcher
. Can work directly with the
ApplicationContext
, obtain an existing bean or
create a new bean
that is autowired in the usual way.Constructor and Description |
---|
ApplicationContextRequestMatcher(Class<? extends C> contextClass) |
Modifier and Type | Method and Description |
---|---|
protected void |
initialized(Supplier<C> context)
Called once the context has been initialized.
|
boolean |
matches(javax.servlet.http.HttpServletRequest request) |
protected abstract boolean |
matches(javax.servlet.http.HttpServletRequest request,
Supplier<C> context)
Decides whether the rule implemented by the strategy matches the supplied request.
|
public final boolean matches(javax.servlet.http.HttpServletRequest request)
matches
in interface org.springframework.security.web.util.matcher.RequestMatcher
protected abstract boolean matches(javax.servlet.http.HttpServletRequest request, Supplier<C> context)
request
- the source requestcontext
- a supplier for the initialized context (may throw an exception)Copyright © 2018 Pivotal Software, Inc.. All rights reserved.