Class PublisherBodyBinder
java.lang.Object
io.micronaut.http.server.netty.binders.PublisherBodyBinder
- All Implemented Interfaces:
AnnotatedArgumentBinder<Body,
,Publisher<?>, HttpRequest<?>> ArgumentBinder<Publisher<?>,
,HttpRequest<?>> TypeArgumentBinder<Publisher<?>,
,HttpRequest<?>> AnnotatedRequestArgumentBinder<Body,
,Publisher<?>> BodyArgumentBinder<Publisher<?>>
,NonBlockingBodyArgumentBinder<Publisher<?>>
,RequestArgumentBinder<Publisher<?>>
,TypedRequestArgumentBinder<Publisher<?>>
@Singleton
public class PublisherBodyBinder
extends Object
implements NonBlockingBodyArgumentBinder<Publisher<?>>
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.core.bind.ArgumentBinder
ArgumentBinder.BindingResult<T>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPublisherBodyBinder
(ConversionService conversionService, HttpContentProcessorResolver httpContentProcessorResolver) -
Method Summary
Modifier and TypeMethodDescriptionbind
(ArgumentConversionContext<Publisher<?>> context, HttpRequest<?> source) Bind the given argument from the given source.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, superTypes
-
Field Details
-
MSG_CONVERT_DEBUG
- See Also:
-
-
Constructor Details
-
PublisherBodyBinder
public PublisherBodyBinder(ConversionService conversionService, HttpContentProcessorResolver httpContentProcessorResolver) - Parameters:
conversionService
- The conversion servicehttpContentProcessorResolver
- The http content processor resolver
-
-
Method Details
-
argumentType
- Specified by:
argumentType
in interfaceTypeArgumentBinder<Publisher<?>,
HttpRequest<?>> - Returns:
- The argument type.
-
bind
public ArgumentBinder.BindingResult<Publisher<?>> bind(ArgumentConversionContext<Publisher<?>> context, HttpRequest<?> source) Description copied from interface:ArgumentBinder
Bind the given argument from the given source.- Specified by:
bind
in interfaceArgumentBinder<Publisher<?>,
HttpRequest<?>> - Parameters:
context
- TheArgumentConversionContext
source
- The source- Returns:
- An
Optional
of the value. If no binding was possibleOptional.empty()
-