Class BlockingExecutionConfigurer
java.lang.Object
org.springframework.web.reactive.config.BlockingExecutionConfigurer
Helps to configure options related to blocking execution in WebFlux.
- Since:
- 6.1
- Author:
- Rossen Stoyanchev
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Predicate<HandlerMethod>
protected AsyncTaskExecutor
setControllerMethodPredicate
(Predicate<HandlerMethod> predicate) Configure a predicate to decide if a controller method is blocking and should be called on a separate thread if an executor is configured.setExecutor
(AsyncTaskExecutor executor) Configure an executor to invoke blocking controller methods with.
-
Constructor Details
-
BlockingExecutionConfigurer
public BlockingExecutionConfigurer()
-
-
Method Details
-
setExecutor
Configure an executor to invoke blocking controller methods with.By default, this is not set in which case controller methods are invoked without the use of an Executor.
- Parameters:
executor
- the task executor to use
-
setControllerMethodPredicate
Configure a predicate to decide if a controller method is blocking and should be called on a separate thread if an executor is configured.The default predicate matches controller methods whose return type is not recognized by the configured
ReactiveAdapterRegistry
.- Parameters:
predicate
- the predicate to use
-
getExecutor
-
getBlockingControllerMethodPredicate
-