org.apache.hc.core5.http.nio.AsyncDataProducer implementation that
generates data stream from content of a string.
| Modifier and Type | Field and Description |
|---|---|
| private final CharBuffer | |
| private final AtomicReference |
| Access | Constructor and Description |
|---|---|
| public | StringAsyncEntityProducer(final CharSequence content, final int bufferSize, final int fragmentSizeHint, final ContentType contentType)
|
| public | StringAsyncEntityProducer(final CharSequence content, final int bufferSize, final ContentType contentType)
|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected int | availableData()
Implements abstract org. |
| public void | failed(final Exception
the cause of the failure. cause)Implements org. |
| public Exception | |
| public boolean | isRepeatable()
Implements org. ResourceHolder#releaseResources().
|
| protected void | produceData(final StreamChannel<CharBuffer>
the data channel capable to accepting more data. channel)Implements abstract org. |
| public void |
| content | back to summary |
|---|---|
| private final CharBuffer content | |
| exception | back to summary |
|---|---|
| private final AtomicReference<Exception> exception | |
| StringAsyncEntityProducer | back to summary |
|---|---|
| public StringAsyncEntityProducer(final CharSequence content, final int bufferSize, final int fragmentSizeHint, final ContentType contentType) | |
| StringAsyncEntityProducer | back to summary |
|---|---|
| public StringAsyncEntityProducer(final CharSequence content, final int bufferSize, final ContentType contentType) | |
| StringAsyncEntityProducer | back to summary |
|---|---|
| public StringAsyncEntityProducer(final CharSequence content, final ContentType contentType) | |
| StringAsyncEntityProducer | back to summary |
|---|---|
| public StringAsyncEntityProducer(final CharSequence content) | |
| availableData | back to summary |
|---|---|
| protected int availableData() Implements abstract 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. | |
| getException | back to summary |
|---|---|
| public Exception getException() | |
| 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
| |
| produceData | back to summary |
|---|---|
| protected void produceData(final StreamChannel<CharBuffer> channel) throws IOException Implements abstract org. Doc from org. Triggered to signal the ability of the underlying char 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() Overrides org. Implements org.
| |