While this class is-a Runnable, it should never be dispatched in it's own thread. It is a runnable only so that the calling thread can use Context#run(Runnable) to setup classloaders etc.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final AsyncContentProducer | |
| pack-priv final BlockingContentProducer | |
| private final ServletChannelState | |
| private volatile boolean | |
| private final LongAdder | |
| private volatile ContentProducer | |
| pack-priv final AutoLock | _lock
The lock shared with |
| private final byte[] | |
| private volatile ReadListener | |
| private final ServletChannel | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. |
| public boolean | |
| private int | |
| private int | |
| public long | |
| public long | |
| public boolean | Returns: true if the input contains content, false otherwise.Check if this HttpInput instance has content stored internally, without fetching/parsing anything from the underlying channel. |
| public boolean | |
| public boolean | |
| public boolean | isFinished()
Implements abstract jakarta. Returns true when all the data from the stream has been read else it returns false. |
| public boolean | isReady()
Implements abstract jakarta. Returns true if data can be read without blocking else returns false. |
| public boolean | |
| public int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public int | read(byte[]
the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. Reads up to |
| public int | |
| private int | |
| public void | |
| public void | |
| public void | |
| private void | |
| public void | setReadListener(ReadListener
the readListener)ReadListener that should be notified when it's possible to read.Implements abstract jakarta. Instructs the |
| public String |
| _asyncContentProducer | back to summary |
|---|---|
| pack-priv final AsyncContentProducer _asyncContentProducer | |
| _blockingContentProducer | back to summary |
|---|---|
| pack-priv final BlockingContentProducer _blockingContentProducer | |
| _channelState | back to summary |
|---|---|
| private final ServletChannelState _channelState | |
| _consumedEof | back to summary |
|---|---|
| private volatile boolean _consumedEof | |
| _contentConsumed | back to summary |
|---|---|
| private final LongAdder _contentConsumed | |
| _contentProducer | back to summary |
|---|---|
| private volatile ContentProducer _contentProducer | |
| _lock | back to summary |
|---|---|
| pack-priv final AutoLock _lock The lock shared with | |
| _oneByteBuffer | back to summary |
|---|---|
| private final byte[] _oneByteBuffer | |
| _readListener | back to summary |
|---|---|
| private volatile ReadListener _readListener | |
| _servletChannel | back to summary |
|---|---|
| private final ServletChannel _servletChannel | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| HttpInput | back to summary |
|---|---|
| public HttpInput(ServletChannel channel) | |
| available | back to summary |
|---|---|
| public int available() Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. The read might be on the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes. Note that while some implementations of A subclass's implementation of this method may choose to throw an
| |
| consumeAvailable | back to summary |
|---|---|
| public boolean consumeAvailable() | |
| get | back to summary |
|---|---|
| private int get(Content. | |
| get | back to summary |
|---|---|
| private int get(Content. | |
| getContentConsumed | back to summary |
|---|---|
| public long getContentConsumed() | |
| getContentReceived | back to summary |
|---|---|
| public long getContentReceived() | |
| hasContent | back to summary |
|---|---|
| public boolean hasContent() Check if this HttpInput instance has content stored internally, without fetching/parsing anything from the underlying channel.
| |
| isAsync | back to summary |
|---|---|
| public boolean isAsync() | |
| isError | back to summary |
|---|---|
| public boolean isError() | |
| isFinished | back to summary |
|---|---|
| public boolean isFinished() Implements abstract jakarta. Doc from jakarta. Returns true when all the data from the stream has been read else it returns false.
| |
| isReady | back to summary |
|---|---|
| public boolean isReady() Implements abstract jakarta. Doc from jakarta. Returns true if data can be read without blocking else returns false.
If this method returns false and a
| |
| onContentProducible | back to summary |
|---|---|
| public boolean onContentProducible() | |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements
| |
| read | back to summary |
|---|---|
| public int read(ByteBuffer buffer) throws IOException | |
| read | back to summary |
|---|---|
| private int read(ByteBuffer buffer, byte[] b, int off, int len) throws IOException | |
| recycle | back to summary |
|---|---|
| public void recycle() | |
| reopen | back to summary |
|---|---|
| public void reopen() | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| scheduleReadListenerNotification | back to summary |
|---|---|
| private void scheduleReadListenerNotification() | |
| setReadListener | back to summary |
|---|---|
| public void setReadListener(ReadListener readListener) Implements abstract jakarta. Doc from jakarta. Instructs the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |