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.HttpRequestclaimForReuse(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 aMultiObjectBodycontainingByteBufs with the raw body.final voidrelease()Release this body and any downstream representations.
-
Method Details
-
processMulti
Description copied from interface:ByteBodyProcess this body using the given processor.
Only used for form processing now.- Specified by:
processMultiin interfaceByteBody- Parameters:
processor- The processor to apply- Returns:
- The new processed body
-
rawContent
Description copied from interface:ByteBodyTransform this body to aMultiObjectBodycontainingByteBufs with the raw body. There is a check againstHttpServerConfiguration.getMaxRequestSize().- Specified by:
rawContentin interfaceByteBody- Parameters:
configuration- The configuration for request size limits- Returns:
- The body containing
ByteBufs
-
buffer
Description copied from interface:ByteBodyFully buffer this body. -
claimForReuse
public io.netty.handler.codec.http.HttpRequest claimForReuse(io.netty.handler.codec.http.HttpRequest request) Description copied from interface:ByteBodyClaim 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:
claimForReusein interfaceByteBody- Parameters:
request- The input request (headers and such)- Returns:
- The request including the body, either a
FullHttpRequestor aStreamedHttpRequest
-
release
public final void release()Description copied from interface:HttpBodyRelease this body and any downstream representations. -
next
Description copied from interface:HttpBodyGet the next representation this body was transformed into, if any.
-