Interface ByteBufConsumer

All Superinterfaces:
io.micronaut.http.body.stream.BufferConsumer
All Known Implementing Classes:
StreamingNettyByteBody.SharedBuffer

@Internal public interface ByteBufConsumer extends io.micronaut.http.body.stream.BufferConsumer
This is a netty-specific reactor-like API for streaming bytes. It's a bit better than reactor because it's more explicit about reference counting semantics, has more fine-grained controls for cancelling, and has more relaxed concurrency semantics.
Since:
4.5.0
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.micronaut.http.body.stream.BufferConsumer

    io.micronaut.http.body.stream.BufferConsumer.Upstream
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(@NonNull io.netty.buffer.ByteBuf buf)
    Consume a buffer.

    Methods inherited from interface io.micronaut.http.body.stream.BufferConsumer

    complete, discard, error
  • Method Details

    • add

      void add(@NonNull @NonNull io.netty.buffer.ByteBuf buf)
      Consume a buffer. Release ownership is transferred to this consumer.
      Parameters:
      buf - The buffer to consume