- All Superinterfaces:
- All Known Implementing Classes:
@Internal public sealed interface MultiObjectBody extends HttpBody permits ImmediateMultiObjectBody, ImmediateSingleObjectBody, StreamingMultiObjectBody
A body consisting of multiple objects of arbitrary type. Basically a
<?>. This class is so generic for compatibility reasons, it's the result of processing a
- Jonas Konrad
(io.netty.buffer.ByteBufAllocator alloc)Coerce this value to an
InputStream. This implements
io.micronaut.http.server.netty.binders.InputStreamBodyBinder. Requires the objects of this body to be
Ownership is transferred to the stream, it must be closed to release all buffers.
alloc- The buffer allocator to use
- The stream that reads the data in this body
asPublisherPublisher<?> asPublisher()Get this value as a publisher. The publisher must be subscribed to exactly once. All objects forwarded to the subscriber become its responsibility and must be released by the subscriber.
- The publisher
mapNotNullApply a mapping function to all objects in this body.
nullvalues in the output are skipped.
transform- The mapping function
- A new body with the mapped values
(FormRouteCompleter formRouteCompleter)Special handling for form data. This method basically acts like
FormRouteCompleterneeds to release the form data fields when the request is destroyed. To do this, it implements
HttpBody.release(). By calling this method, the
FormRouteCompleteris registered as the
next bodyand will be released.
formRouteCompleter- The form route completer that should take over processing