Package org.springframework.data.spel
Class ReactiveExtensionAwareEvaluationContextProvider
java.lang.Object
org.springframework.data.spel.ReactiveExtensionAwareEvaluationContextProvider
- All Implemented Interfaces:
EvaluationContextProvider,ReactiveEvaluationContextProvider
public class ReactiveExtensionAwareEvaluationContextProvider
extends Object
implements ReactiveEvaluationContextProvider
A reactive
EvaluationContextProvider that assembles an EvaluationContext from a list of
ReactiveEvaluationContextExtension and EvaluationContextExtension instances.- Since:
- 2.4
- Author:
- Mark Paluch
-
Field Summary
Fields inherited from interface org.springframework.data.spel.EvaluationContextProvider
DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionReactiveExtensionAwareEvaluationContextProvider(Collection<? extends ExtensionIdAware> extensions) Creates a newReactiveExtensionAwareEvaluationContextProviderfor the givenEvaluationContextExtensions.Create a newReactiveExtensionAwareEvaluationContextProviderwith extensions looked up lazily from the givenListableBeanFactory. -
Method Summary
Modifier and TypeMethodDescriptiongetEvaluationContext(Object rootObject) Return aEvaluationContextbuilt using the given parameter values.getEvaluationContext(Object rootObject, ExpressionDependencies dependencies) Return a tailoredEvaluationContextbuilt using the given parameter values and consideringexpression dependencies.reactor.core.publisher.Mono<StandardEvaluationContext>getEvaluationContextLater(Object rootObject) Return aEvaluationContextbuilt using the given parameter values.reactor.core.publisher.Mono<StandardEvaluationContext>getEvaluationContextLater(Object rootObject, ExpressionDependencies dependencies) Return a tailoredEvaluationContextbuilt using the given parameter values and consideringexpression dependencies.
-
Constructor Details
-
ReactiveExtensionAwareEvaluationContextProvider
public ReactiveExtensionAwareEvaluationContextProvider() -
ReactiveExtensionAwareEvaluationContextProvider
Create a newReactiveExtensionAwareEvaluationContextProviderwith extensions looked up lazily from the givenListableBeanFactory.- Parameters:
beanFactory- theListableBeanFactoryto lookup extensions from.
-
ReactiveExtensionAwareEvaluationContextProvider
public ReactiveExtensionAwareEvaluationContextProvider(Collection<? extends ExtensionIdAware> extensions) Creates a newReactiveExtensionAwareEvaluationContextProviderfor the givenEvaluationContextExtensions.- Parameters:
extensions- must not be null.
-
-
Method Details
-
getEvaluationContext
Description copied from interface:EvaluationContextProviderReturn aEvaluationContextbuilt using the given parameter values.- Specified by:
getEvaluationContextin interfaceEvaluationContextProvider- Parameters:
rootObject- the root object to set in theEvaluationContext.- Returns:
-
getEvaluationContext
public EvaluationContext getEvaluationContext(Object rootObject, ExpressionDependencies dependencies) Description copied from interface:EvaluationContextProviderReturn a tailoredEvaluationContextbuilt using the given parameter values and consideringexpression dependencies. The returnedEvaluationContextmay contain a reduced visibility of methods and properties/fields according to the requiredexpression dependencies.- Specified by:
getEvaluationContextin interfaceEvaluationContextProvider- Parameters:
rootObject- the root object to set in theEvaluationContext.dependencies- the requested expression dependencies to be available.- Returns:
-
getEvaluationContextLater
public reactor.core.publisher.Mono<StandardEvaluationContext> getEvaluationContextLater(@Nullable Object rootObject) Description copied from interface:ReactiveEvaluationContextProviderReturn aEvaluationContextbuilt using the given parameter values.- Specified by:
getEvaluationContextLaterin interfaceReactiveEvaluationContextProvider- Parameters:
rootObject- the root object to set in theEvaluationContext.- Returns:
- a mono that emits exactly one
EvaluationContext.
-
getEvaluationContextLater
public reactor.core.publisher.Mono<StandardEvaluationContext> getEvaluationContextLater(@Nullable Object rootObject, ExpressionDependencies dependencies) Description copied from interface:ReactiveEvaluationContextProviderReturn a tailoredEvaluationContextbuilt using the given parameter values and consideringexpression dependencies. The returnedEvaluationContextmay contain a reduced visibility of methods and properties/fields according to the requiredexpression dependencies.- Specified by:
getEvaluationContextLaterin interfaceReactiveEvaluationContextProvider- Parameters:
rootObject- the root object to set in theEvaluationContext.dependencies- the requested expression dependencies to be available.- Returns:
- a mono that emits exactly one
EvaluationContext.
-