@Singleton @Internal public class CompletableFutureBodyBinder extends DefaultBodyAnnotationBinder<CompletableFuture> implements NonBlockingBodyArgumentBinder<CompletableFuture>
NonBlockingBodyArgumentBinder
that handles CompletableFuture
instances.ArgumentBinder.BindingResult<T>
conversionService
Constructor and Description |
---|
CompletableFutureBodyBinder(BeanLocator beanLocator,
HttpServerConfiguration httpServerConfiguration,
ConversionService conversionService) |
Modifier and Type | Method and Description |
---|---|
Argument<CompletableFuture> |
argumentType() |
ArgumentBinder.BindingResult<CompletableFuture> |
bind(ArgumentConversionContext<CompletableFuture> context,
HttpRequest<?> source)
Bind the given argument from the given source.
|
getAnnotationType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnnotationType
of
public CompletableFutureBodyBinder(BeanLocator beanLocator, HttpServerConfiguration httpServerConfiguration, ConversionService conversionService)
beanLocator
- The bean locatorhttpServerConfiguration
- The Http server configurationconversionService
- The conversion servicepublic Argument<CompletableFuture> argumentType()
argumentType
in interface TypeArgumentBinder<CompletableFuture,HttpRequest<?>>
public ArgumentBinder.BindingResult<CompletableFuture> bind(ArgumentConversionContext<CompletableFuture> context, HttpRequest<?> source)
ArgumentBinder
bind
in interface ArgumentBinder<CompletableFuture,HttpRequest<?>>
bind
in class DefaultBodyAnnotationBinder<CompletableFuture>
context
- The ArgumentConversionContext
source
- The sourceOptional
of the value. If no binding was possible Optional.empty()