ContentDecoder that serves as a base for all content
decoder implementations.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final SessionInputBuffer | |
| pack-priv final ReadableByteChannel | |
| protected boolean | |
| pack-priv final BasicHttpTransportMetrics |
| Access | Constructor and Description |
|---|---|
| public | AbstractContentDecoder(final ReadableByteChannel
the source channel. channel, final SessionInputBuffer the session input buffer that can be used to store
session data for intermediate processing. buffer, final BasicHttpTransportMetrics Transport metrics of the underlying HTTP transport. metrics)Creates an instance of this class. |
| Modifier and Type | Method and Description |
|---|---|
| protected SessionInputBuffer | |
| protected ReadableByteChannel | |
| protected int | Returns: number of bytes transferred.Reads from the channel to the session buffer. |
| public List | getTrailers()
Implements org. |
| public boolean | isCompleted()
Implements org. true if the entity has been received in its
entirety.
|
| protected BasicHttpTransportMetrics | |
| protected int | Returns: number of bytes transferred.destination. dst)Reads from the channel to the destination. |
| protected int | Returns: number of bytes transferred.destination. dst, final int max number of bytes to transfer. limit)Reads from the channel to the destination. |
| public void | setCompleted(final boolean
the completed status of this decoder. completed)Sets the completed status of this decoder. |
| protected void |
| buffer | back to summary |
|---|---|
| pack-priv final SessionInputBuffer buffer | |
| channel | back to summary |
|---|---|
| pack-priv final ReadableByteChannel channel | |
| completed | back to summary |
|---|---|
| protected boolean completed | |
| metrics | back to summary |
|---|---|
| pack-priv final BasicHttpTransportMetrics metrics | |
| AbstractContentDecoder | back to summary |
|---|---|
| public AbstractContentDecoder(final ReadableByteChannel channel, final SessionInputBuffer buffer, final BasicHttpTransportMetrics metrics) Creates an instance of this class.
| |
| buffer | back to summary |
|---|---|
| protected SessionInputBuffer buffer() | |
| channel | back to summary |
|---|---|
| protected ReadableByteChannel channel() | |
| fillBufferFromChannel | back to summary |
|---|---|
| protected int fillBufferFromChannel() throws IOException Reads from the channel to the session buffer.
| |
| getTrailers | back to summary |
|---|---|
| public List Implements org. Doc from org. Returns content trailers if available | |
| isCompleted | back to summary |
|---|---|
| public boolean isCompleted() Implements org. Doc from org. Returns
| |
| metrics | back to summary |
|---|---|
| protected BasicHttpTransportMetrics metrics() | |
| readFromChannel | back to summary |
|---|---|
| protected int readFromChannel(final ByteBuffer dst) throws IOException Reads from the channel to the destination.
| |
| readFromChannel | back to summary |
|---|---|
| protected int readFromChannel(final ByteBuffer dst, final int limit) throws IOException Reads from the channel to the destination.
| |
| setCompleted | back to summary |
|---|---|
| public void setCompleted(final boolean completed) Sets the completed status of this decoder. Normally this is not necessary (the decoder will automatically complete when the underlying channel returns EOF). It is useful to mark the decoder as completed if you have some other means to know all the necessary data has been read and want to reuse the underlying connection for more messages.
| |
| setCompleted | back to summary |
|---|---|
| protected void setCompleted() Sets the completed status of this decoder to true. Normally this is not necessary (the decoder will automatically complete when the underlying channel returns EOF). It is useful to mark the decoder as completed if you have some other means to know all the necessary data has been read and want to reuse the underlying connection for more messages.
| |