Package io.micronaut.http.body.stream
Class BaseSharedBuffer.AsFlux
java.lang.Object
io.micronaut.http.body.stream.BaseSharedBuffer.AsFlux
- All Implemented Interfaces:
BufferConsumer
- Enclosing class:
- BaseSharedBuffer
BufferConsumer that can subscribe to a BaseSharedBuffer and return the
buffer as a Flux. Used to implement ByteBody.toReadBufferPublisher() and
similar methods.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.http.body.stream.BufferConsumer
BufferConsumer.Upstream -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ReadBuffer buf) Send a buffer to this consumer.reactor.core.publisher.Flux<ReadBuffer>asFlux(BufferConsumer.Upstream upstream) voidcomplete()Signal normal completion of the stream.voidSignal an upstream error.Methods 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
discard
-
Constructor Details
-
Method Details
-
add
Description copied from interface:BufferConsumerSend a buffer to this consumer. Ownership of the buffer transfers to the consumer.- Specified by:
addin interfaceBufferConsumer- Parameters:
buf- The buffer
-
complete
public void complete()Description copied from interface:BufferConsumerSignal normal completion of the stream.- Specified by:
completein interfaceBufferConsumer
-
error
Description copied from interface:BufferConsumerSignal an upstream error.- Specified by:
errorin interfaceBufferConsumer- Parameters:
e- The error
-
asFlux
-