| Modifier and Type | Field and Description |
|---|---|
| private static final ByteBuffer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract int | Returns: the number of bytes this consumer is prepared to process.Triggered to obtain the capacity increment. |
| protected abstract void | |
| public final void | consume(final ByteBuffer
data source. src)Implements org. |
| protected abstract void | data(ByteBuffer
the data packet. src, boolean flag indicating whether this data packet is the last in the data stream. endOfStream)Triggered to pass incoming data packet to the data consumer. |
| public final void | streamEnd(final List<? extends Header>
data stream trailers. trailers)Implements org. |
| public final void | updateCapacity(final CapacityChannel
the channel for capacity updates. capacityChannel)Implements org. |
| EMPTY | back to summary |
|---|---|
| private static final ByteBuffer EMPTY | |
| AbstractBinDataConsumer | back to summary |
|---|---|
| public AbstractBinDataConsumer() | |
| capacityIncrement | back to summary |
|---|---|
| protected abstract int capacityIncrement() Triggered to obtain the capacity increment.
| |
| completed | back to summary |
|---|---|
| protected abstract void completed() throws IOException Triggered to signal completion of data processing. | |
| consume | back to summary |
|---|---|
| public final void consume(final ByteBuffer src) throws IOException Implements org. Doc from org. Triggered to pass incoming data to the data consumer. The consumer must consume the entire content of the data buffer. The consumer must stop incrementing its capacity on the capacity channel if it is unable to accept more data. Once the data consumer has handled accumulated data or allocated more intermediate storage it can update its capacity information on the capacity channel.
| |
| data | back to summary |
|---|---|
| protected abstract void data(ByteBuffer src, boolean endOfStream) throws IOException Triggered to pass incoming data packet to the data consumer.
| |
| streamEnd | back to summary |
|---|---|
| public final void streamEnd(final List<? extends Header> trailers) throws HttpException, IOException Implements org. Doc from org. Triggered to signal termination of the data stream. | |
| updateCapacity | back to summary |
|---|---|
| public final void updateCapacity(final CapacityChannel capacityChannel) throws IOException Implements org. Doc from org. Triggered to signal ability of the underlying data stream to receive data capacity update. The data consumer can choose to write data immediately inside the call or asynchronously at some later point.
| |