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

pack-priv Class PredicateResourceLookupFunction

extends Object
implements Function<ServerRequest, Mono<Resource>>
Class Inheritance
All Implemented Interfaces
java.util.function.Function
Imports
java.util.function.Function, reactor.core.publisher.Mono, org.springframework.core.io.Resource, org.springframework.util.Assert

Lookup function used by RouterFunctions#resource(RequestPredicate, Resource) and RouterFunctions#resource(RequestPredicate, Resource, java.util.function.BiConsumer).
Author
Sebastien Deleuze
Since
6.1.4

Field Summary

Modifier and TypeField and Description
private final RequestPredicate
private final Resource

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Mono<Resource>
apply(ServerRequest
the function argument
serverRequest
)

Implements java.util.function.Function.apply.

Applies this function to the given argument.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

predicateback to summary
private final RequestPredicate predicate
resourceback to summary
private final Resource resource

Constructor Detail

PredicateResourceLookupFunctionback to summary
public PredicateResourceLookupFunction(RequestPredicate predicate, Resource resource)

Method Detail

applyback to summary
public Mono<Resource> apply(ServerRequest serverRequest)

Implements java.util.function.Function.apply.

Doc from java.util.function.Function.apply.

Applies this function to the given argument.

Parameters
serverRequest:ServerRequest

the function argument

Returns:Mono<Resource>

the function result

Annotations
@Override