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

pack-priv Class ToStringVisitor

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

Implementation of RouterFunctions.Visitor that creates a formatted string representation of router functions.
Author
Arjen Poutsma
Since
5.0

Field Summary

Modifier and TypeField and Description
private final StringBuilder
private int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
and()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.and.

Receive "middle" notification of a logical AND predicate.

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.

public void
endAnd()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.endAnd.

Receive last notification of a logical AND predicate.

public void
endNegate()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.endNegate.

Receive last notification of a negated predicate.

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
endOr()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.endOr.

Receive last notification of a logical OR predicate.

public void
header(String
the name of the HTTP header to check
name
,
String
the desired value of the HTTP header
value
)

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.header.

Receive notification of an HTTP header predicate.

private void
public void
method(Set<HttpMethod>
the HTTP methods that make up the predicate
methods
)

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.method.

Receive notification of an HTTP method predicate.

public void
or()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.or.

Receive "middle" notification of a logical OR predicate.

public void
path(String
the path pattern that makes up the predicate
pattern
)

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.path.

Receive notification of a path predicate.

public void
pathExtension(String
the path extension that makes up the predicate
extension
)

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.pathExtension.

Receive notification of a path extension predicate.

public void
queryParam(String
the name of the query parameter
name
,
String
the desired value of the parameter
value
)

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.queryParam.

Receive notification of a query parameter predicate.

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
startAnd()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.startAnd.

Receive first notification of a logical AND predicate.

public void
startNegate()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.startNegate.

Receive first notification of a negated predicate.

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
startOr()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.startOr.

Receive first notification of a logical OR predicate.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

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.

public void
unknown(RequestPredicate predicate)

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

Receive first notification of an unknown predicate.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

builderback to summary
private final StringBuilder builder
indentback to summary
private int indent

Constructor Detail

ToStringVisitorback to summary
pack-priv ToStringVisitor()

Method Detail

andback to summary
public void and()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.and.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.and.

Receive "middle" notification of a logical AND predicate. The following notification contains the right-hand side, followed by endAnd().

Annotations
@Override
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
endAndback to summary
public void endAnd()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.endAnd.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.endAnd.

Receive last notification of a logical AND predicate.

Annotations
@Override
endNegateback to summary
public void endNegate()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.endNegate.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.endNegate.

Receive last notification of a negated predicate.

Annotations
@Override
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
endOrback to summary
public void endOr()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.endOr.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.endOr.

Receive last notification of a logical OR predicate.

Annotations
@Override
headerback to summary
public void header(String name, String value)

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.header.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.header.

Receive notification of an HTTP header predicate.

Parameters
name:String

the name of the HTTP header to check

value:String

the desired value of the HTTP header

Annotations
@Override
indentback to summary
private void indent()
methodback to summary
public void method(Set<HttpMethod> methods)

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.method.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.method.

Receive notification of an HTTP method predicate.

Parameters
methods:Set<HttpMethod>

the HTTP methods that make up the predicate

Annotations
@Override
orback to summary
public void or()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.or.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.or.

Receive "middle" notification of a logical OR predicate. The following notification contains the right-hand side, followed by endOr().

Annotations
@Override
pathback to summary
public void path(String pattern)

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.path.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.path.

Receive notification of a path predicate.

Parameters
pattern:String

the path pattern that makes up the predicate

Annotations
@Override
pathExtensionback to summary
public void pathExtension(String extension)

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.pathExtension.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.pathExtension.

Receive notification of a path extension predicate.

Parameters
extension:String

the path extension that makes up the predicate

Annotations
@Override
queryParamback to summary
public void queryParam(String name, String value)

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.queryParam.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.queryParam.

Receive notification of a query parameter predicate.

Parameters
name:String

the name of the query parameter

value:String

the desired value of the parameter

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
startAndback to summary
public void startAnd()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.startAnd.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.startAnd.

Receive first notification of a logical AND predicate. The first subsequent notification will contain the left-hand side of the AND-predicate; followed by and(), followed by the right-hand side, followed by endAnd().

Annotations
@Override
startNegateback to summary
public void startNegate()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.startNegate.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.startNegate.

Receive first notification of a negated predicate. The first subsequent notification will contain the negated predicated, followed by endNegate().

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
startOrback to summary
public void startOr()

Implements org.springframework.web.reactive.function.server.RequestPredicates.Visitor.startOr.

Doc from org.springframework.web.reactive.function.server.RequestPredicates.Visitor.startOr.

Receive first notification of a logical OR predicate. The first subsequent notification will contain the left-hand side of the OR-predicate; the second notification contains the right-hand side, followed by endOr().

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

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
unknownback to summary
public void unknown(RequestPredicate predicate)

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

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

Receive first notification of an unknown predicate.

Annotations
@Override