Class ReactiveEntityProducer

java.lang.Object
org.apache.hc.core5.reactive.ReactiveEntityProducer
All Implemented Interfaces:
EntityDetails, AsyncDataProducer, AsyncEntityProducer, ResourceHolder

@Contract(threading=SAFE) public final class ReactiveEntityProducer extends Object implements AsyncEntityProducer
An AsyncEntityProducer that subscribes to a Publisher instance, as defined by the Reactive Streams specification.
Since:
5.0
  • Field Details

    • reactiveDataProducer

      private final ReactiveDataProducer reactiveDataProducer
    • contentLength

      private final long contentLength
    • contentType

      private final ContentType contentType
    • contentEncoding

      private final String contentEncoding
  • Constructor Details

    • ReactiveEntityProducer

      public ReactiveEntityProducer(org.reactivestreams.Publisher<ByteBuffer> publisher, long contentLength, ContentType contentType, String contentEncoding)
      Creates a new ReactiveEntityProducer with the given parameters.
      Parameters:
      publisher - the publisher of the entity stream.
      contentLength - the length of the entity, or -1 if unknown (implies chunked encoding).
      contentType - the Content-Type of the entity, or null if none.
      contentEncoding - the Content-Encoding of the entity, or null if none.
  • Method Details