Top Description Inners Fields Constructors Methods
org.springframework.web.reactive.function.server

pack-priv Class ChangePathPatternParserVisitor

extends Object
implements Visitor
Class Inheritance
All Implemented Interfaces
org.springframework.web.reactive.function.server.RouterFunctions.Visitor
Imports
java.util.Map, java.util.function.Function, reactor.core.publisher.Mono, org.springframework.core.io.Resource, org.springframework.util.Assert, org.springframework.web.util.pattern.PathPatternParser

Implementation of RouterFunctions.Visitor that changes the PathPatternParser on path-related request predicates (i.e. RequestPredicates.PathPatternPredicate).
Author
Arjen Poutsma
Since
5.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
ChangePathPatternParserVisitor.Target

Interface implemented by predicates that can change the parser.

Field Summary

Modifier and TypeField and Description
private final PathPatternParser

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
attributes(Map<String, Object>
the attributes that apply to the following router
attributes
)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.attributes.

Receive notification of a router function with attributes.

private void
public void
endNested(RequestPredicate
the predicate that applies to the nested router functions
predicate
)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.endNested.

Receive notification of the end of a nested router function.

public void
resources(Function<ServerRequest, Mono<Resource>>
the lookup function for the resources
lookupFunction
)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.resources.

Receive notification of a resource router function.

public void
route(RequestPredicate
the predicate that applies to the handler function
predicate
,
HandlerFunction<?>
the handler function.
handlerFunction
)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.route.

Receive notification of a standard predicated route to a handler function.

public void
startNested(RequestPredicate
the predicate that applies to the nested router functions
predicate
)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.startNested.

Receive notification of the beginning of a nested router function.

public void
unknown(RouterFunction<?>
the router function
routerFunction
)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.unknown.

Receive notification of an unknown router function.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

parserback to summary
private final PathPatternParser parser

Constructor Detail

ChangePathPatternParserVisitorback to summary
public ChangePathPatternParserVisitor(PathPatternParser parser)

Method Detail

attributesback to summary
public void attributes(Map<String, Object> attributes)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.attributes.

Doc from org.springframework.web.reactive.function.server.RouterFunctions.Visitor.attributes.

Receive notification of a router function with attributes. The given attributes apply to the router notification that follows this one.

Parameters
attributes:Map<String, Object>

the attributes that apply to the following router

Annotations
@Override
changeParserback to summary
private void changeParser(RequestPredicate predicate)
endNestedback to summary
public void endNested(RequestPredicate predicate)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.endNested.

Doc from org.springframework.web.reactive.function.server.RouterFunctions.Visitor.endNested.

Receive notification of the end of a nested router function.

Parameters
predicate:RequestPredicate

the predicate that applies to the nested router functions

Annotations
@Override
resourcesback to summary
public void resources(Function<ServerRequest, Mono<Resource>> lookupFunction)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.resources.

Doc from org.springframework.web.reactive.function.server.RouterFunctions.Visitor.resources.

Receive notification of a resource router function.

Parameters
lookupFunction:Function<ServerRequest, Mono<Resource>>

the lookup function for the resources

Annotations
@Override
routeback to summary
public void route(RequestPredicate predicate, HandlerFunction<?> handlerFunction)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.route.

Doc from org.springframework.web.reactive.function.server.RouterFunctions.Visitor.route.

Receive notification of a standard predicated route to a handler function.

Parameters
predicate:RequestPredicate

the predicate that applies to the handler function

handlerFunction:HandlerFunction<?>

the handler function.

Annotations
@Override
startNestedback to summary
public void startNested(RequestPredicate predicate)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.startNested.

Doc from org.springframework.web.reactive.function.server.RouterFunctions.Visitor.startNested.

Receive notification of the beginning of a nested router function.

Parameters
predicate:RequestPredicate

the predicate that applies to the nested router functions

Annotations
@Override
unknownback to summary
public void unknown(RouterFunction<?> routerFunction)

Implements org.springframework.web.reactive.function.server.RouterFunctions.Visitor.unknown.

Doc from org.springframework.web.reactive.function.server.RouterFunctions.Visitor.unknown.

Receive notification of an unknown router function. This method is called for router functions that were not created via the various RouterFunctions methods.

Parameters
routerFunction:RouterFunction<?>

the router function

Annotations
@Override
org.springframework.web.reactive.function.server back to summary

public Interface ChangePathPatternParserVisitor.Target

Known Direct Implementers
org.springframework.web.reactive.function.server.RequestPredicates.PathPatternPredicate, org.springframework.web.reactive.function.server.RequestPredicates.AndRequestPredicate, org.springframework.web.reactive.function.server.RequestPredicates.NegateRequestPredicate, org.springframework.web.reactive.function.server.RequestPredicates.OrRequestPredicate

Interface implemented by predicates that can change the parser.

Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

changeParserback to summary
public void changeParser(PathPatternParser parser)