Class PartUploadAnnotationBinder<T>
java.lang.Object
io.micronaut.http.server.netty.binders.PartUploadAnnotationBinder<T>
- Type Parameters:
T
- The part type
- All Implemented Interfaces:
AnnotatedArgumentBinder<Part,
,T, HttpRequest<?>> ArgumentBinder<T,
,HttpRequest<?>> AnnotatedRequestArgumentBinder<Part,
,T> RequestArgumentBinder<T>
,StreamedNettyRequestArgumentBinder<T>
public class PartUploadAnnotationBinder<T>
extends Object
implements AnnotatedRequestArgumentBinder<Part,T>, StreamedNettyRequestArgumentBinder<T>
Bind values annotated with
Part
.- Since:
- 4.0.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.core.bind.ArgumentBinder
ArgumentBinder.BindingResult<T>
-
Constructor Summary
ConstructorDescriptionPartUploadAnnotationBinder
(ConversionService conversionService, CompletedFileUploadBinder completedFileUploadBinder, io.micronaut.http.server.netty.binders.PublisherPartUploadBinder publisherPartUploadBinder) -
Method Summary
Modifier and TypeMethodDescriptionbindForStreamedNettyRequest
(ArgumentConversionContext<T> context, StreamedHttpRequest streamedHttpRequest, NettyHttpRequest<?> request) 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.server.netty.binders.StreamedNettyRequestArgumentBinder
bind
-
Constructor Details
-
PartUploadAnnotationBinder
public PartUploadAnnotationBinder(ConversionService conversionService, CompletedFileUploadBinder completedFileUploadBinder, io.micronaut.http.server.netty.binders.PublisherPartUploadBinder publisherPartUploadBinder)
-
-
Method Details
-
bindForStreamedNettyRequest
public ArgumentBinder.BindingResult<T> bindForStreamedNettyRequest(ArgumentConversionContext<T> context, StreamedHttpRequest streamedHttpRequest, NettyHttpRequest<?> request) Description copied from interface:StreamedNettyRequestArgumentBinder
Bind the given argument from the given source.- Specified by:
bindForStreamedNettyRequest
in interfaceStreamedNettyRequestArgumentBinder<T>
- Parameters:
context
- TheArgumentConversionContext
streamedHttpRequest
- The streamed HTTP requestrequest
- The netty http request- Returns:
- An
Optional
of the value. If no binding was possibleOptional.empty()
-
getAnnotationType
- Specified by:
getAnnotationType
in interfaceAnnotatedArgumentBinder<Part,
T, HttpRequest<?>> - Returns:
- The annotation type.
-