public abstract class AbstractCharDataConsumer extends Object implements AsyncDataConsumer
| 限定符和类型 | 字段和说明 |
|---|---|
protected static int |
DEF_BUF_SIZE |
| 限定符 | 构造器和说明 |
|---|---|
|
AbstractCharDataConsumer() |
protected |
AbstractCharDataConsumer(int bufSize,
CharCodingConfig charCodingConfig) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract int |
capacityIncrement()
Triggered to obtain the capacity increment.
|
protected abstract void |
completed()
Triggered to signal completion of data processing.
|
void |
consume(ByteBuffer src)
Triggered to pass incoming data to the data consumer.
|
protected abstract void |
data(CharBuffer src,
boolean endOfStream)
Triggered to pass incoming data packet to the data consumer.
|
protected void |
setCharset(Charset charset) |
void |
streamEnd(List<? extends Header> trailers)
Triggered to signal termination of the data stream.
|
void |
updateCapacity(CapacityChannel capacityChannel)
Triggered to signal ability of the underlying data stream to receive
data capacity update.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreleaseResourcesprotected static final int DEF_BUF_SIZE
protected AbstractCharDataConsumer(int bufSize,
CharCodingConfig charCodingConfig)
public AbstractCharDataConsumer()
protected abstract int capacityIncrement()
protected abstract void data(CharBuffer src, boolean endOfStream) throws IOException
src - the data packet.endOfStream - flag indicating whether this data packet is the last in the data stream.IOExceptionprotected abstract void completed()
throws IOException
IOExceptionprotected final void setCharset(Charset charset)
public final void updateCapacity(CapacityChannel capacityChannel) throws IOException
AsyncDataConsumerupdateCapacity 在接口中 AsyncDataConsumercapacityChannel - the channel for capacity updates.IOExceptionpublic final void consume(ByteBuffer src) throws IOException
AsyncDataConsumerconsume 在接口中 AsyncDataConsumersrc - data source.IOExceptionpublic final void streamEnd(List<? extends Header> trailers) throws HttpException, IOException
AsyncDataConsumerstreamEnd 在接口中 AsyncDataConsumertrailers - data stream trailers.HttpExceptionIOExceptionCopyright © 2023. All rights reserved.