AsyncEntityProducer implementation that generates data stream
from content of a byte array.
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBuffer | |
| private final boolean | |
| private final ContentType | |
| private final AtomicReference | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | BasicAsyncEntityProducer(final byte[] content, final ContentType contentType, final boolean chunked)
|
| public | |
| public | |
| public | BasicAsyncEntityProducer(final CharSequence content, final ContentType contentType, final boolean chunked)
|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Implements org. |
| public final void | failed(final Exception
the cause of the failure. cause)Implements org. |
| public String | getContentEncoding()
Implements org. |
| public long | getContentLength()
Implements org. |
| public final String | getContentType()
Implements org. |
| public final Exception | |
| public Set | getTrailerNames()
Implements org. |
| public boolean | isChunked()
Implements org. |
| public boolean | isRepeatable()
Implements org. ResourceHolder#releaseResources().
|
| public final void | produce(final DataStreamChannel
the data channel capable to accepting more data. channel)Implements org. |
| public void |
| bytebuf | back to summary |
|---|---|
| private final ByteBuffer bytebuf | |
| chunked | back to summary |
|---|---|
| private final boolean chunked | |
| contentType | back to summary |
|---|---|
| private final ContentType contentType | |
| exception | back to summary |
|---|---|
| private final AtomicReference<Exception> exception | |
| length | back to summary |
|---|---|
| private final int length | |
| BasicAsyncEntityProducer | back to summary |
|---|---|
| public BasicAsyncEntityProducer(final byte[] content, final ContentType contentType, final boolean chunked) | |
| BasicAsyncEntityProducer | back to summary |
|---|---|
| public BasicAsyncEntityProducer(final byte[] content, final ContentType contentType) | |
| BasicAsyncEntityProducer | back to summary |
|---|---|
| public BasicAsyncEntityProducer(final byte[] content) | |
| BasicAsyncEntityProducer | back to summary |
|---|---|
| public BasicAsyncEntityProducer(final CharSequence content, final ContentType contentType, final boolean chunked) | |
| BasicAsyncEntityProducer | back to summary |
|---|---|
| public BasicAsyncEntityProducer(final CharSequence content, final ContentType contentType) | |
| BasicAsyncEntityProducer | back to summary |
|---|---|
| public BasicAsyncEntityProducer(final CharSequence content) | |
| 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 final 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 final String getContentType() Implements org. Doc from org. Returns content type of the entity, if known.
| |
| getException | back to summary |
|---|---|
| public final Exception getException() | |
| 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 final 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.
| |