Class ApplicationContextServerWebExchangeMatcher<C>
java.lang.Object
org.springframework.boot.security.reactive.ApplicationContextServerWebExchangeMatcher<C>
- Type Parameters:
- C- the type of the context that the match method actually needs to use. Can be an- ApplicationContextor a class of an- existing bean.
- All Implemented Interfaces:
- ServerWebExchangeMatcher
- Direct Known Subclasses:
- EndpointRequest.EndpointServerWebExchangeMatcher,- EndpointRequest.LinksServerWebExchangeMatcher
public abstract class ApplicationContextServerWebExchangeMatcher<C>
extends Object
implements ServerWebExchangeMatcher
ApplicationContext backed ServerWebExchangeMatcher. Can work directly
 with the ApplicationContext, obtain an existing bean or
 create a new bean
 that is autowired in the usual way.- Since:
- 2.0.0
- Author:
- Madhura Bhave
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcherServerWebExchangeMatcher.MatchResult
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetContext(ServerWebExchange exchange) protected booleanignoreApplicationContext(ApplicationContext applicationContext) Returns if theApplicationContextshould be ignored and not used for matching.protected voidinitialized(Supplier<C> context) Called once the context has been initialized.final reactor.core.publisher.Mono<ServerWebExchangeMatcher.MatchResult>matches(ServerWebExchange exchange) protected abstract reactor.core.publisher.Mono<ServerWebExchangeMatcher.MatchResult>matches(ServerWebExchange exchange, Supplier<C> context) Decides whether the rule implemented by the strategy matches the supplied exchange.
- 
Constructor Details- 
ApplicationContextServerWebExchangeMatcher
 
- 
- 
Method Details- 
matchespublic final reactor.core.publisher.Mono<ServerWebExchangeMatcher.MatchResult> matches(ServerWebExchange exchange) - Specified by:
- matchesin interface- ServerWebExchangeMatcher
 
- 
matchesprotected abstract reactor.core.publisher.Mono<ServerWebExchangeMatcher.MatchResult> matches(ServerWebExchange exchange, Supplier<C> context) Decides whether the rule implemented by the strategy matches the supplied exchange.- Parameters:
- exchange- the source exchange
- context- a supplier for the initialized context (may throw an exception)
- Returns:
- if the exchange matches
 
- 
ignoreApplicationContextReturns if theApplicationContextshould be ignored and not used for matching. If this method returnstruethen the context will not be used and thematchesmethod will returnfalse.- Parameters:
- applicationContext- the candidate application context
- Returns:
- if the application context should be ignored
- Since:
- 2.2.5
 
- 
getContext
- 
initializedCalled once the context has been initialized.- Parameters:
- context- a supplier for the initialized context (may throw an exception)
 
 
-