Package io.micronaut.http.server.netty
Class FormDataHttpContentProcessor
java.lang.Object
io.micronaut.http.server.netty.AbstractHttpContentProcessor
io.micronaut.http.server.netty.FormDataHttpContentProcessor
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable,HttpContentProcessor
Decodes MediaType.MULTIPART_FORM_DATA in a non-blocking manner.
Designed to be used by a single thread
- Since:
- 1.0
-
Field Summary
Fields inherited from class io.micronaut.http.server.netty.AbstractHttpContentProcessor
advertisedLength, configuration, nettyHttpRequest, receivedLength, requestMaxSize -
Constructor Summary
ConstructorsConstructorDescriptionFormDataHttpContentProcessor(NettyHttpRequest<?> nettyHttpRequest, io.micronaut.http.server.HttpServerConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(io.netty.buffer.ByteBufHolder message, Collection<Object> out) Process more data.voidcancel()Cancel processing, clean up any data.voidcomplete(Collection<Object> out) Finish processing data.booleanprotected voidonData(io.netty.buffer.ByteBufHolder message, Collection<Object> out) Called after verifying the data of the message.Methods inherited from class io.micronaut.http.server.netty.AbstractHttpContentProcessor
fireExceedsLengthMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.server.netty.HttpContentProcessor
processSingle, resultType
-
Constructor Details
-
FormDataHttpContentProcessor
public FormDataHttpContentProcessor(NettyHttpRequest<?> nettyHttpRequest, io.micronaut.http.server.HttpServerConfiguration configuration) - Parameters:
nettyHttpRequest- TheNettyHttpRequestconfiguration- TheNettyHttpServerConfiguration
-
-
Method Details
-
isEnabled
public boolean isEnabled() -
onData
Description copied from class:AbstractHttpContentProcessorCalled after verifying the data of the message.- Specified by:
onDatain classAbstractHttpContentProcessor- Parameters:
message- The messageout- The collection to add any produced messages to
-
add
Description copied from interface:HttpContentProcessorProcess more data.- Specified by:
addin interfaceHttpContentProcessor- Overrides:
addin classAbstractHttpContentProcessor- Parameters:
message- The input dataout- The collection to add output items to- Throws:
Throwable
-
complete
Description copied from interface:HttpContentProcessorFinish processing data.- Parameters:
out- The collection to add remaining output items to
-
cancel
public void cancel()Description copied from interface:HttpContentProcessorCancel processing, clean up any data. After this, there should be no more calls toHttpContentProcessor.add(io.netty.buffer.ByteBufHolder, java.util.Collection<java.lang.Object>)andHttpContentProcessor.complete(java.util.Collection<java.lang.Object>).
-