Package io.micronaut.http.body
Class ConcatenatingSubscriber.ByteBufferConcatenatingSubscriber
java.lang.Object
io.micronaut.http.body.ConcatenatingSubscriber
io.micronaut.http.body.ConcatenatingSubscriber.ByteBufferConcatenatingSubscriber
- All Implemented Interfaces:
BufferConsumer,BufferConsumer.Upstream,Subscriber<ByteBody>,reactor.core.CoreSubscriber<ByteBody>
- Direct Known Subclasses:
ConcatenatingSubscriber.JsonByteBufferConcatenatingSubscriber
- Enclosing class:
- ConcatenatingSubscriber
public static class ConcatenatingSubscriber.ByteBufferConcatenatingSubscriber
extends ConcatenatingSubscriber
Concatenating implementation that writes to a
ReactiveByteBufferByteBody.-
Nested Class Summary
Nested classes/interfaces inherited from class io.micronaut.http.body.ConcatenatingSubscriber
ConcatenatingSubscriber.ByteBufferConcatenatingSubscriber, ConcatenatingSubscriber.JsonByteBufferConcatenatingSubscriberNested classes/interfaces inherited from interface io.micronaut.http.body.stream.BufferConsumer
BufferConsumer.Upstream -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(@NonNull ByteBuffer buffer) static CloseableByteBodyconcatenate(Publisher<ByteBody> publisher) protected BufferConsumer.UpstreamForward the given body to the shared buffer.protected voidForward completion to the shared buffer.protected voidForward an error to the shared buffer.Methods inherited from class io.micronaut.http.body.ConcatenatingSubscriber
allowDiscard, complete, disregardBackpressure, emitFinalSeparator, emitLeadingSeparator, error, onBytesConsumed, onComplete, onError, onForward, onNext, onSubscribe, startMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.body.stream.BufferConsumer
complete, discard, errorMethods inherited from interface reactor.core.CoreSubscriber
currentContext
-
Method Details
-
concatenate
-
forward
Description copied from class:ConcatenatingSubscriberForward the given body to the shared buffer.- Specified by:
forwardin classConcatenatingSubscriber- Parameters:
body- The body- Returns:
- The
BufferConsumer.Upstreamto control component backpressure, ornullif all bytes were written immediately (as is the case for anAvailableByteBody)
-
add
-
forwardComplete
protected void forwardComplete()Description copied from class:ConcatenatingSubscriberForward completion to the shared buffer.- Specified by:
forwardCompletein classConcatenatingSubscriber
-
forwardError
Description copied from class:ConcatenatingSubscriberForward an error to the shared buffer.- Specified by:
forwardErrorin classConcatenatingSubscriber- Parameters:
t- The error
-