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:
Toggleable
,HttpContentProcessor
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
Fields inherited from class io.micronaut.http.server.netty.AbstractHttpContentProcessor
advertisedLength, configuration, nettyHttpRequest, receivedLength, requestMaxSize
-
Constructor Summary
ConstructorDescriptionFormDataHttpContentProcessor
(NettyHttpRequest<?> nettyHttpRequest, HttpServerConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(io.netty.buffer.ByteBufHolder message, Collection<Object> out) Process more data.void
cancel()
Cancel processing, clean up any data.void
complete
(Collection<Object> out) Finish processing data.boolean
protected void
onData
(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
fireExceedsLength
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.HttpContentProcessor
processSingle, resultType
-
Constructor Details
-
FormDataHttpContentProcessor
public FormDataHttpContentProcessor(NettyHttpRequest<?> nettyHttpRequest, HttpServerConfiguration configuration) - Parameters:
nettyHttpRequest
- TheNettyHttpRequest
configuration
- TheNettyHttpServerConfiguration
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Returns:
- Whether the component is enabled
-
onData
Description copied from class:AbstractHttpContentProcessor
Called after verifying the data of the message.- Specified by:
onData
in classAbstractHttpContentProcessor
- Parameters:
message
- The messageout
- The collection to add any produced messages to
-
add
Description copied from interface:HttpContentProcessor
Process more data.- Specified by:
add
in interfaceHttpContentProcessor
- Overrides:
add
in classAbstractHttpContentProcessor
- Parameters:
message
- The input dataout
- The collection to add output items to- Throws:
Throwable
-
complete
Description copied from interface:HttpContentProcessor
Finish processing data.- Parameters:
out
- The collection to add remaining output items to
-
cancel
public void cancel()Description copied from interface:HttpContentProcessor
Cancel 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>)
.
-