AsyncEntityProducer
that subscribes to a Publisher
instance, as defined by the Reactive Streams specification.
Modifier and Type | Field and Description |
---|---|
private final String | |
private final long | |
private final ContentType | |
private final ReactiveDataProducer |
Access | Constructor and Description |
---|---|
public | ReactiveEntityProducer(final Publisher<ByteBuffer>
the publisher of the entity stream. publisher, final long the length of the entity, or -1 if unknown (implies chunked encoding). contentLength, final ContentType the contentType, final String Content-Type of the entity, or null if none.the contentEncoding)Content-Encoding of the entity, or null if none.Creates a new |
Modifier and Type | Method and Description |
---|---|
public int | available()
Implements org. |
public void | failed(final Exception
the cause of the failure. cause)Implements org. |
public String | getContentEncoding()
Implements org. |
public long | getContentLength()
Implements org. |
public String | getContentType()
Implements org. |
public Set | getTrailerNames()
Implements org. |
public boolean | isChunked()
Implements org. |
public boolean | isRepeatable()
Implements org. ResourceHolder#releaseResources() .
|
public void | produce(final DataStreamChannel
the data channel capable to accepting more data. channel)Implements org. |
public void |
contentEncoding | back to summary |
---|---|
private final String contentEncoding |
contentLength | back to summary |
---|---|
private final long contentLength |
contentType | back to summary |
---|---|
private final ContentType contentType |
reactiveDataProducer | back to summary |
---|---|
private final ReactiveDataProducer reactiveDataProducer |
ReactiveEntityProducer | back to summary |
---|---|
public ReactiveEntityProducer(final Publisher<ByteBuffer> publisher, final long contentLength, final ContentType contentType, final String contentEncoding) Creates a new
|
available | back to summary |
---|---|
public int available() Implements org. Doc from org. Returns the number of bytes immediately available for output. This method can be used as a hint to control output events of the underlying I/O session.
|
failed | back to summary |
---|---|
public void failed(final Exception cause) Implements org. Doc from org. Triggered to signal a failure in data generation. |
getContentEncoding | back to summary |
---|---|
public String getContentEncoding() Implements org. Doc from org. Returns content encoding of the entity, if known.
|
getContentLength | back to summary |
---|---|
public long getContentLength() Implements org. Doc from org. Returns length of the entity, if known.
|
getContentType | back to summary |
---|---|
public String getContentType() Implements org. Doc from org. Returns content type of the entity, if known.
|
getTrailerNames | back to summary |
---|---|
public Set Implements org. Doc from org. Preliminary declaration of trailing headers.
|
isChunked | back to summary |
---|---|
public boolean isChunked() Implements org. Doc from org. Returns chunked transfer hint for this entity. The behavior of wrapping entities is implementation dependent, but should respect the primary purpose.
|
isRepeatable | back to summary |
---|---|
public boolean isRepeatable() Implements org. Doc from org. Determines whether the producer can consistently produce the same content
after invocation of
|
produce | back to summary |
---|---|
public void produce(final DataStreamChannel channel) throws IOException Implements org. Doc from org. Triggered to signal the ability of the underlying data channel to accept more data. The data producer can choose to write data immediately inside the call or asynchronously at some later point.
|
releaseResources | back to summary |
---|---|
public void releaseResources() Implements org.
|