| Modifier and Type | Class and Description |
|---|---|
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private ChannelListener | |
| private long | |
| private int | |
| private final HeaderMap | |
| private boolean | headersEndStream
Flag that is set if the headers frame has the end stream flag set, but not end headers which means the last continuation frame is the end of the stream. |
| private boolean | ignoreForceClose
This is a bit of a hack, basically it allows the container to delay sending a RST_STREAM on a channel that is knows is broken, because it wants to delay the RST until after the response has been set Used for handling the super nasty 100-continue logic |
| private int | |
| private Http2HeadersStreamSinkChannel | |
| private boolean | |
| private final int | |
| private Http2StreamSourceChannel. |
| Access | Constructor and Description |
|---|---|
| pack-priv | Http2StreamSourceChannel(Http2Channel framedChannel, PooledByteBuffer data, long frameDataRemaining, HeaderMap headers, int streamId)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | complete()
Overrides io. Method that is invoked when all data has been read. |
| public ChannelListener | |
| public HeaderMap | |
| public Http2HeadersStreamSinkChannel | |
| public int | |
| public Http2StreamSourceChannel. | |
| pack-priv void | |
| protected void | |
| pack-priv boolean | |
| public boolean | |
| public int | read(ByteBuffer
The buffer into which bytes are to be transferred dst)Overrides io. Implements java. Reads a sequence of bytes from this channel into the given buffer. |
| public long | read(ByteBuffer[]
The buffers into which bytes are to be transferred dsts, int The offset within the buffer array of the first buffer into
which bytes are to be transferred; must be non-negative and no
larger than offset, int dsts.lengthThe maximum number of buffers to be accessed; must be
non-negative and no larger than
length)dsts.length - offsetOverrides io. Implements java. Reads a sequence of bytes from this channel into a subsequence of the given buffers. |
| public long | read(ByteBuffer[]
The buffers into which bytes are to be transferred dsts)Overrides io. Implements java. Reads a sequence of bytes from this channel into the given buffers. |
| pack-priv void | rstStream(int error)
Overrides io.
|
| public void | |
| public void | |
| public void | |
| public String | |
| public long | transferTo(long
the number of bytes to be transferred count, ByteBuffer the buffer to copy through. throughBuffer, StreamSinkChannel the destination to write to streamSinkChannel)Overrides io. Implements org. Transfers bytes into the given channel target. |
| public long | transferTo(long
the position within the file from which the transfer is to begin position, long the number of bytes to be transferred count, FileChannel the file to write to target)Overrides io. Implements org. Transfers bytes into the given file from this channel. |
| pack-priv void | updateContentSize(long
The amount of data in the frame frameLength, boolean If this is the last frame last)Checks that the actual content size matches the expected. |
| private void | |
| protected long | updateFrameDataRemaining(PooledByteBuffer data, long frameDataRemaining)
Overrides io.
|
| completionListener | back to summary |
|---|---|
| private ChannelListener<Http2StreamSourceChannel> completionListener | |
| contentLengthRemaining | back to summary |
|---|---|
| private long contentLengthRemaining | |
| flowControlWindow | back to summary |
|---|---|
| private int flowControlWindow | |
| headers | back to summary |
|---|---|
| private final HeaderMap headers | |
| headersEndStream | back to summary |
|---|---|
| private boolean headersEndStream Flag that is set if the headers frame has the end stream flag set, but not end headers which means the last continuation frame is the end of the stream. | |
| ignoreForceClose | back to summary |
|---|---|
| private boolean ignoreForceClose This is a bit of a hack, basically it allows the container to delay sending a RST_STREAM on a channel that is knows is broken, because it wants to delay the RST until after the response has been set Used for handling the super nasty 100-continue logic | |
| remainingPadding | back to summary |
|---|---|
| private int remainingPadding | |
| response | back to summary |
|---|---|
| private Http2HeadersStreamSinkChannel response | |
| rst | back to summary |
|---|---|
| private boolean rst | |
| streamId | back to summary |
|---|---|
| private final int streamId | |
| trailersHandler | back to summary |
|---|---|
| private Http2StreamSourceChannel. | |
| Http2StreamSourceChannel | back to summary |
|---|---|
| pack-priv Http2StreamSourceChannel(Http2Channel framedChannel, PooledByteBuffer data, long frameDataRemaining, HeaderMap headers, int streamId) | |
| channelForciblyClosed | back to summary |
|---|---|
| protected void channelForciblyClosed() Overrides io.
| |
| complete | back to summary |
|---|---|
| protected void complete() throws IOException Overrides io. Doc from io. Method that is invoked when all data has been read.
| |
| getCompletionListener | back to summary |
|---|---|
| public ChannelListener | |
| getHeaders | back to summary |
|---|---|
| public HeaderMap getHeaders() | |
| getResponseChannel | back to summary |
|---|---|
| public Http2HeadersStreamSinkChannel getResponseChannel() | |
| getStreamId | back to summary |
|---|---|
| public int getStreamId() Implements io. | |
| getTrailersHandler | back to summary |
|---|---|
| public Http2StreamSourceChannel. | |
| handleFinalFrame | back to summary |
|---|---|
| pack-priv void handleFinalFrame(Http2FrameHeaderParser headerData) | |
| handleHeaderData | back to summary |
|---|---|
| protected void handleHeaderData(FrameHeaderData headerData) Overrides io.
| |
| isHeadersEndStream | back to summary |
|---|---|
| pack-priv boolean isHeadersEndStream() | |
| isIgnoreForceClose | back to summary |
|---|---|
| public boolean isIgnoreForceClose() | |
| read | back to summary |
|---|---|
| public int read(ByteBuffer dst) throws IOException Overrides io. Implements java. Doc from java. Reads a sequence of bytes from this channel into the given buffer. An attempt is made to read up to r bytes from the channel,
where r is the number of bytes remaining in the buffer, that is,
Suppose that a byte sequence of length n is read, where
A read operation might not fill the buffer, and in fact it might not read any bytes at all. Whether or not it does so depends upon the nature and state of the channel. A socket channel in non-blocking mode, for example, cannot read any more bytes than are immediately available from the socket's input buffer; similarly, a file channel cannot read any more bytes than remain in the file. It is guaranteed, however, that if a channel is in blocking mode and there is at least one byte remaining in the buffer then this method will block until at least one byte is read. This method may be invoked at any time. If another thread has already initiated a read operation upon this channel, however, then an invocation of this method will block until the first operation is complete.
| |
| read | back to summary |
|---|---|
| public long read(ByteBuffer[] dsts, int offset, int length) throws IOException Overrides io. Implements java. Doc from java. Reads a sequence of bytes from this channel into a subsequence of the given buffers. An invocation of this method attempts to read up to r bytes from this channel, where r is the total number of bytes remaining in the specified subsequence of the given buffer array, that is, dsts[offset].remaining() + dsts[offset+1].remaining() + ... + dsts[offset+length-1].remaining() Suppose that a byte sequence of length n is read, where
This method may be invoked at any time. If another thread has already initiated a read operation upon this channel, however, then an invocation of this method will block until the first operation is complete.
| |
| read | back to summary |
|---|---|
| public long read(ByteBuffer[] dsts) throws IOException Overrides io. Implements java. Doc from java. Reads a sequence of bytes from this channel into the given buffers. An invocation of this method of the form c.read(dsts, 0, dsts.length);
| |
| rstStream | back to summary |
|---|---|
| pack-priv void rstStream(int error) Overrides io.
| |
| setCompletionListener | back to summary |
|---|---|
| public void setCompletionListener(ChannelListener<Http2StreamSourceChannel> completionListener) | |
| setIgnoreForceClose | back to summary |
|---|---|
| public void setIgnoreForceClose(boolean ignoreForceClose) | |
| setTrailersHandler | back to summary |
|---|---|
| public void setTrailersHandler(Http2StreamSourceChannel. | |
| 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- | |
| transferTo | back to summary |
|---|---|
| public long transferTo(long count, ByteBuffer throughBuffer, StreamSinkChannel streamSinkChannel) throws IOException Overrides io. Implements org. Doc from org. Transfers bytes into the given channel target. On some platforms, this may avoid copying bytes between user
and kernel space. On other platforms, bytes are passed through the
If the current thread is interrupted when this method is called, it may throw a
| |
| transferTo | back to summary |
|---|---|
| public long transferTo(long position, long count, FileChannel target) throws IOException Overrides io. Implements org. Doc from org. Transfers bytes into the given file from this channel. Using this method in preference to
If the current thread is interrupted when this method is called, it may throw a
| |
| updateContentSize | back to summary |
|---|---|
| pack-priv void updateContentSize(long frameLength, boolean last) Checks that the actual content size matches the expected. We check this proactivly, rather than as the data is read
| |
| updateFlowControlWindow | back to summary |
|---|---|
| private void updateFlowControlWindow(final int read) throws IOException | |
| updateFrameDataRemaining | back to summary |
|---|---|
| protected long updateFrameDataRemaining(PooledByteBuffer data, long frameDataRemaining) Overrides io.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| handleTrailers | back to summary |
|---|---|
| public void handleTrailers(HeaderMap headerMap) | |