Class StreamingByteBody
java.lang.Object
io.micronaut.http.server.netty.body.StreamingByteBody
ByteBody
implementation that wraps a
StreamedHttpRequest
.- Since:
- 4.0.0
- Author:
- Jonas Konrad
-
Method Summary
Modifier and TypeMethodDescriptionbuffer
(io.netty.buffer.ByteBufAllocator alloc) Fully buffer this body.io.netty.handler.codec.http.HttpRequest
claimForReuse
(io.netty.handler.codec.http.HttpRequest request) Claim this body and convert it back to aHttpRequest
.next()
Get the next representation this body was transformed into, if any.processMulti
(FormDataHttpContentProcessor processor) Process this body using the given processor.
Only used for form processing now.rawContent
(HttpServerConfiguration configuration) Transform this body to aMultiObjectBody
containingByteBuf
s with the raw body.final void
release()
Release this body and any downstream representations.
-
Method Details
-
processMulti
Description copied from interface:ByteBody
Process this body using the given processor.
Only used for form processing now.- Specified by:
processMulti
in interfaceByteBody
- Parameters:
processor
- The processor to apply- Returns:
- The new processed body
-
rawContent
Description copied from interface:ByteBody
Transform this body to aMultiObjectBody
containingByteBuf
s with the raw body. There is a check againstHttpServerConfiguration.getMaxRequestSize()
.- Specified by:
rawContent
in interfaceByteBody
- Parameters:
configuration
- The configuration for request size limits- Returns:
- The body containing
ByteBuf
s
-
buffer
Description copied from interface:ByteBody
Fully buffer this body. -
claimForReuse
public io.netty.handler.codec.http.HttpRequest claimForReuse(io.netty.handler.codec.http.HttpRequest request) Description copied from interface:ByteBody
Claim this body and convert it back to aHttpRequest
. This is used for proxying, where the request received by the server is reused by the client.- Specified by:
claimForReuse
in interfaceByteBody
- Parameters:
request
- The input request (headers and such)- Returns:
- The request including the body, either a
FullHttpRequest
or aStreamedHttpRequest
-
release
public final void release()Description copied from interface:HttpBody
Release this body and any downstream representations. -
next
Description copied from interface:HttpBody
Get the next representation this body was transformed into, if any.
-