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 TypeMethodDescriptionvoid
add
(ReadBuffer buf) Send a buffer to this consumer.reactor.core.publisher.Flux<ReadBuffer>
asFlux
(BufferConsumer.Upstream upstream) void
complete()
Signal normal completion of the stream.void
Signal an upstream error.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.body.stream.BufferConsumer
discard
-
Constructor Details
-
Method Details
-
add
Description copied from interface:BufferConsumer
Send a buffer to this consumer. Ownership of the buffer transfers to the consumer.- Specified by:
add
in interfaceBufferConsumer
- Parameters:
buf
- The buffer
-
complete
public void complete()Description copied from interface:BufferConsumer
Signal normal completion of the stream.- Specified by:
complete
in interfaceBufferConsumer
-
error
Description copied from interface:BufferConsumer
Signal an upstream error.- Specified by:
error
in interfaceBufferConsumer
- Parameters:
e
- The error
-
asFlux
-