Class ByteBufferStoringSubscriber

  • All Implemented Interfaces:
    org.reactivestreams.Subscriber<ByteBuffer>

    public class ByteBufferStoringSubscriber
    extends Object
    implements org.reactivestreams.Subscriber<ByteBuffer>
    An implementation of Subscriber that stores ByteBuffer events it receives for retrieval.

    Stored bytes can be read via transferTo(ByteBuffer).

    • Constructor Detail

      • ByteBufferStoringSubscriber

        public ByteBufferStoringSubscriber​(long minimumBytesBuffered)
        Create a subscriber that stores at least minimumBytesBuffered in memory for retrieval.
    • Method Detail

      • onSubscribe

        public void onSubscribe​(org.reactivestreams.Subscription s)
        Specified by:
        onSubscribe in interface org.reactivestreams.Subscriber<ByteBuffer>
      • onNext

        public void onNext​(ByteBuffer byteBuffer)
        Specified by:
        onNext in interface org.reactivestreams.Subscriber<ByteBuffer>
      • onError

        public void onError​(Throwable t)
        Specified by:
        onError in interface org.reactivestreams.Subscriber<ByteBuffer>
      • onComplete

        public void onComplete()
        Specified by:
        onComplete in interface org.reactivestreams.Subscriber<ByteBuffer>