Class BytesReadTrackingPublisher

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

    public final class BytesReadTrackingPublisher
    extends Object
    implements org.reactivestreams.Publisher<ByteBuffer>
    Publisher that tracks how many bytes are published from the wrapped publisher to the downstream subscriber.
    • Constructor Detail

      • BytesReadTrackingPublisher

        public BytesReadTrackingPublisher​(org.reactivestreams.Publisher<ByteBuffer> upstream,
                                          AtomicLong bytesRead)
    • Method Detail

      • subscribe

        public void subscribe​(org.reactivestreams.Subscriber<? super ByteBuffer> subscriber)
        Specified by:
        subscribe in interface org.reactivestreams.Publisher<ByteBuffer>
      • bytesRead

        public long bytesRead()