C - The type of the context that the match method actually needs to use. Can be
an ApplicationContext, a class of an existing bean or a custom type that will be
created on demand.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.ServerWebExchangeMatcher.MatchResult| Constructor and Description |
|---|
ApplicationContextServerWebExchangeMatcher(Class<? extends C> contextClass) |
| Modifier and Type | Method and Description |
|---|---|
protected C |
getContext(ServerWebExchange exchange) |
protected void |
initialized(C context)
Called once the context has been initialized.
|
reactor.core.publisher.Mono<ServerWebExchangeMatcher.MatchResult> |
matches(ServerWebExchange exchange) |
protected abstract reactor.core.publisher.Mono<ServerWebExchangeMatcher.MatchResult> |
matches(ServerWebExchange exchange,
C context)
Decides whether the rule implemented by the strategy matches the supplied exchange.
|
public final reactor.core.publisher.Mono<ServerWebExchangeMatcher.MatchResult> matches(ServerWebExchange exchange)
matches in interface ServerWebExchangeMatcherprotected abstract reactor.core.publisher.Mono<ServerWebExchangeMatcher.MatchResult> matches(ServerWebExchange exchange, C context)
exchange - the source exchangecontext - the context instanceprotected C getContext(ServerWebExchange exchange)
protected void initialized(C context)
context - the initialized contextCopyright © 2018 Pivotal Software, Inc.. All rights reserved.