Class BaseSharedBuffer.AsFlux<B>

java.lang.Object
io.micronaut.http.body.stream.BaseSharedBuffer.AsFlux<B>
Type Parameters:
B - The buffer type
All Implemented Interfaces:
BufferConsumer
Enclosing class:
BaseSharedBuffer<C extends BufferConsumer,F>

public abstract static class BaseSharedBuffer.AsFlux<B> extends Object implements BufferConsumer
BufferConsumer that can subscribe to a BaseSharedBuffer and return the buffer as a Flux. Used to implement ByteBody.toByteBufferPublisher() and similar methods.
Subclass implements the specific BufferConsumer add method and size(Object).
  • Constructor Details

  • Method Details

    • size

      protected abstract int size(B buf)
    • add0

      public final boolean add0(B buf)
    • complete

      public final void complete()
      Description copied from interface: BufferConsumer
      Signal normal completion of the stream.
      Specified by:
      complete in interface BufferConsumer
    • error

      public final void error(Throwable e)
      Description copied from interface: BufferConsumer
      Signal an upstream error.
      Specified by:
      error in interface BufferConsumer
      Parameters:
      e - The error
    • asFlux

      public final reactor.core.publisher.Flux<B> asFlux(BufferConsumer.Upstream upstream)