@Internal public class CompletableFutureBodyBinder extends DefaultBodyAnnotationBinder<java.util.concurrent.CompletableFuture> implements NonBlockingBodyArgumentBinder<java.util.concurrent.CompletableFuture>
NonBlockingBodyArgumentBinder
that handles CompletableFuture
instances.ArgumentBinder.BindingResult<T>
conversionService
Constructor and Description |
---|
CompletableFutureBodyBinder(HttpContentProcessorResolver httpContentProcessorResolver,
ConversionService conversionService) |
Modifier and Type | Method and Description |
---|---|
Argument<java.util.concurrent.CompletableFuture> |
argumentType() |
ArgumentBinder.BindingResult<java.util.concurrent.CompletableFuture> |
bind(ArgumentConversionContext<java.util.concurrent.CompletableFuture> context,
HttpRequest<?> source)
Bind the given argument from the given source.
|
java.util.List<java.lang.Class<?>> |
superTypes()
Returns additional super types.
|
boolean |
supportsSuperTypes()
Determines whether arguments that are an interface that
T
implements are candidates for binding. |
getAnnotationType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnnotationType
of
public CompletableFutureBodyBinder(HttpContentProcessorResolver httpContentProcessorResolver, ConversionService conversionService)
httpContentProcessorResolver
- The http content processor resolverconversionService
- The conversion servicepublic boolean supportsSuperTypes()
TypedRequestArgumentBinder
T
implements are candidates for binding.supportsSuperTypes
in interface TypedRequestArgumentBinder<java.util.concurrent.CompletableFuture>
@NonNull public java.util.List<java.lang.Class<?>> superTypes()
TypedRequestArgumentBinder
superTypes
in interface TypedRequestArgumentBinder<java.util.concurrent.CompletableFuture>
public Argument<java.util.concurrent.CompletableFuture> argumentType()
argumentType
in interface TypeArgumentBinder<java.util.concurrent.CompletableFuture,HttpRequest<?>>
public ArgumentBinder.BindingResult<java.util.concurrent.CompletableFuture> bind(ArgumentConversionContext<java.util.concurrent.CompletableFuture> context, HttpRequest<?> source)
ArgumentBinder
bind
in interface ArgumentBinder<java.util.concurrent.CompletableFuture,HttpRequest<?>>
bind
in class DefaultBodyAnnotationBinder<java.util.concurrent.CompletableFuture>
context
- The ArgumentConversionContext
source
- The sourceOptional
of the value. If no binding was possible Optional.empty()