Class CompletableFutureBodyBinder
java.lang.Object
io.micronaut.http.server.netty.binders.CompletableFutureBodyBinder
- All Implemented Interfaces:
AnnotatedArgumentBinder<Body,
,CompletableFuture<?>, HttpRequest<?>> ArgumentBinder<CompletableFuture<?>,
,HttpRequest<?>> TypeArgumentBinder<CompletableFuture<?>,
,HttpRequest<?>> AnnotatedRequestArgumentBinder<Body,
,CompletableFuture<?>> BodyArgumentBinder<CompletableFuture<?>>
,NonBlockingBodyArgumentBinder<CompletableFuture<?>>
,RequestArgumentBinder<CompletableFuture<?>>
,TypedRequestArgumentBinder<CompletableFuture<?>>
@Internal
public class CompletableFutureBodyBinder
extends Object
implements NonBlockingBodyArgumentBinder<CompletableFuture<?>>
A
NonBlockingBodyArgumentBinder
that handles CompletableFuture
instances.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.core.bind.ArgumentBinder
ArgumentBinder.BindingResult<T>
-
Constructor Summary
ConstructorDescriptionCompletableFutureBodyBinder
(HttpContentProcessorResolver httpContentProcessorResolver, ConversionService conversionService, BeanProvider<HttpServerConfiguration> httpServerConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionbind
(ArgumentConversionContext<CompletableFuture<?>> context, HttpRequest<?> source) Bind the given argument from the given source.Returns additional super types.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.bind.binders.BodyArgumentBinder
getAnnotationType
Methods inherited from interface io.micronaut.http.bind.binders.TypedRequestArgumentBinder
matches
-
Constructor Details
-
CompletableFutureBodyBinder
public CompletableFutureBodyBinder(HttpContentProcessorResolver httpContentProcessorResolver, ConversionService conversionService, BeanProvider<HttpServerConfiguration> httpServerConfiguration) - Parameters:
httpContentProcessorResolver
- The http content processor resolverconversionService
- The conversion servicehttpServerConfiguration
- The server configuration
-
-
Method Details
-
superTypes
Description copied from interface:TypedRequestArgumentBinder
Returns additional super types.- Specified by:
superTypes
in interfaceTypedRequestArgumentBinder<CompletableFuture<?>>
- Returns:
- Additional supers types
-
argumentType
- Specified by:
argumentType
in interfaceTypeArgumentBinder<CompletableFuture<?>,
HttpRequest<?>> - Returns:
- The argument type.
-
bind
public ArgumentBinder.BindingResult<CompletableFuture<?>> bind(ArgumentConversionContext<CompletableFuture<?>> context, HttpRequest<?> source) Description copied from interface:ArgumentBinder
Bind the given argument from the given source.- Specified by:
bind
in interfaceArgumentBinder<CompletableFuture<?>,
HttpRequest<?>> - Parameters:
context
- TheArgumentConversionContext
source
- The source- Returns:
- An
Optional
of the value. If no binding was possibleOptional.empty()
-