Package io.micronaut.http.server.netty
Class FormDataHttpContentProcessor
java.lang.Object
io.micronaut.http.server.netty.FormDataHttpContentProcessor
Decodes MediaType.MULTIPART_FORM_DATA in a non-blocking manner.
Designed to be used by a single thread
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final longprotected final NettyHttpServerConfigurationprotected final NettyHttpRequest<?>protected final AtomicLongprotected final long -
Constructor Summary
ConstructorsConstructorDescriptionFormDataHttpContentProcessor(NettyHttpRequest<?> nettyHttpRequest, NettyHttpServerConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(io.netty.buffer.ByteBufHolder message, Collection<? super io.netty.handler.codec.http.multipart.InterfaceHttpData> out) voidcancel()voidcomplete(Collection<? super io.netty.handler.codec.http.multipart.InterfaceHttpData> out) protected voidfireExceedsLength(long receivedLength, long expected, io.netty.buffer.ByteBufHolder message) protected voidonData(io.netty.buffer.ByteBufHolder message, Collection<? super io.netty.handler.codec.http.multipart.InterfaceHttpData> out)
-
Field Details
-
nettyHttpRequest
-
advertisedLength
protected final long advertisedLength -
requestMaxSize
protected final long requestMaxSize -
receivedLength
-
configuration
-
-
Constructor Details
-
FormDataHttpContentProcessor
public FormDataHttpContentProcessor(NettyHttpRequest<?> nettyHttpRequest, NettyHttpServerConfiguration configuration) - Parameters:
nettyHttpRequest- TheNettyHttpRequestconfiguration- TheNettyHttpServerConfiguration
-
-
Method Details
-
onData
protected void onData(io.netty.buffer.ByteBufHolder message, Collection<? super io.netty.handler.codec.http.multipart.InterfaceHttpData> out) -
add
public void add(io.netty.buffer.ByteBufHolder message, Collection<? super io.netty.handler.codec.http.multipart.InterfaceHttpData> out) throws Throwable - Throws:
Throwable
-
complete
public void complete(Collection<? super io.netty.handler.codec.http.multipart.InterfaceHttpData> out) throws Throwable - Throws:
Throwable
-
cancel
public void cancel() -
fireExceedsLength
protected void fireExceedsLength(long receivedLength, long expected, io.netty.buffer.ByteBufHolder message) - Parameters:
receivedLength- The length of the content receivedexpected- The expected length of the contentmessage- The message to release
-