| Modifier and Type | Class and Description |
|---|---|
| private static class | DefaultInputBuffer.
Class represent input queue element |
| Modifier and Type | Field and Description |
|---|---|
| private volatile Termination | |
| private static final AtomicReferenceFieldUpdater | |
| private boolean | |
| private final Object | |
| private final Http2Session | |
| private final AtomicBoolean | |
| private final BlockingQueue | |
| private volatile int | |
| private static final AtomicIntegerFieldUpdater | |
| private static final Logger | |
| private static final long | |
| private long | |
| private final Http2Stream | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private static int | |
| private HttpContent | |
| private HttpContent | |
| private boolean | Returns: true if we don't expect more content, or false if we do expect more content or we're not sure because content-length header was not specified by peer.the number of bytes we've just got. newDataChunkSize)Based on content-length header (which we may have or may not), double check if the payload we've just got is last. |
| private void | checkEOF(final DefaultInputBuffer.
the inputElementInputElement to check EOF status against.Checks if the passed InputElement is input buffer EOF element. |
| public void | close(final Termination termination)
Implements org. Graceful input buffer close. |
| public boolean | isClosed()
Implements org. Returns true if the InputBuffer has been closed. |
| public boolean | offer(final Buffer data, final boolean isLast)
Implements org. The method is called, when new input data arrives. |
| private void | offer0(final DefaultInputBuffer.
The private method, which adds new InputElement to the input queue |
| public void | onReadEventComplete()
Implements org. The method will be invoked once upstream completes READ operation processing. |
| private void | passPayloadUpstream(final DefaultInputBuffer.
InputElement element to be appended to the current input queue content and sent upstreamthe current input queue size (-1 if we don't have this information at the moment). readyBuffersCount)Sends the available input data upstream. |
| public HttpContent | poll()
Implements org. Retrieves available input buffer payload, waiting up to the
|
| private Buffer | poll0()
Retrieves available input buffer payload, waiting up to the
|
| private boolean | |
| private int | |
| private void | |
| public void | terminate(final Termination termination)
Implements org. Forcibly closes the input buffer. |
| closeFlag | back to summary |
|---|---|
private volatile Termination closeFlag
| |
| closeFlagUpdater | back to summary |
|---|---|
| private static final AtomicReferenceFieldUpdater<DefaultInputBuffer, Termination> closeFlagUpdater | |
| expectInputSwitch | back to summary |
|---|---|
| private boolean expectInputSwitch | |
| expectInputSwitchSync | back to summary |
|---|---|
| private final Object expectInputSwitchSync | |
| http2Session | back to summary |
|---|---|
| private final Http2Session http2Session | |
| inputClosed | back to summary |
|---|---|
| private final AtomicBoolean inputClosed | |
| inputQueue | back to summary |
|---|---|
| private final BlockingQueue<DefaultInputBuffer. | |
| inputQueueSize | back to summary |
|---|---|
| private volatile int inputQueueSize | |
| inputQueueSizeUpdater | back to summary |
|---|---|
| private static final AtomicIntegerFieldUpdater<DefaultInputBuffer> inputQueueSizeUpdater | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| NULL_CONTENT_LENGTH | back to summary |
|---|---|
| private static final long NULL_CONTENT_LENGTH | |
| remainingContentLength | back to summary |
|---|---|
| private long remainingContentLength | |
| stream | back to summary |
|---|---|
| private final Http2Stream stream | |
| terminateSync | back to summary |
|---|---|
| private final Object terminateSync | |
| DefaultInputBuffer | back to summary |
|---|---|
| pack-priv DefaultInputBuffer(final Http2Stream stream) | |
| bufSz | back to summary |
|---|---|
| private static int bufSz(final Buffer buffer) | |
| buildBrokenHttpContent | back to summary |
|---|---|
| private HttpContent buildBrokenHttpContent(final Throwable t) | |
| buildHttpContent | back to summary |
|---|---|
| private HttpContent buildHttpContent(final Buffer payload) Builds | |
| checkContentLength | back to summary |
|---|---|
| private boolean checkContentLength(final int newDataChunkSize) Based on content-length header (which we may have or may not), double check if the payload we've just got is last.
| |
| checkEOF | back to summary |
|---|---|
| private void checkEOF(final DefaultInputBuffer. Checks if the passed InputElement is input buffer EOF element.
| |
| close | back to summary |
|---|---|
| public void close(final Termination termination) Implements org. Graceful input buffer close. Marks the input buffer as closed by adding Termination input element to the input queue.
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Implements org. Returns true if the InputBuffer has been closed.
| |
| offer | back to summary |
|---|---|
| public boolean offer(final Buffer data, final boolean isLast) Implements org. The method is called, when new input data arrives.
| |
| offer0 | back to summary |
|---|---|
| private void offer0(final DefaultInputBuffer. The private method, which adds new InputElement to the input queue | |
| onReadEventComplete | back to summary |
|---|---|
| public void onReadEventComplete() Implements org. The method will be invoked once upstream completes READ operation processing. Here we have to simulate NIO OP_READ event re-registration.
| |
| passPayloadUpstream | back to summary |
|---|---|
| private void passPayloadUpstream(final DefaultInputBuffer. Sends the available input data upstream.
| |
| poll | back to summary |
|---|---|
| public HttpContent poll() throws IOException Implements org. Retrieves available input buffer payload, waiting up to the
| |
| poll0 | back to summary |
|---|---|
| private Buffer poll0() throws IOException Retrieves available input buffer payload, waiting up to the
| |
| switchOffExpectInput | back to summary |
|---|---|
| private boolean switchOffExpectInput() | |
| switchOffExpectInputIfQueueNotEmpty | back to summary |
|---|---|
| private int switchOffExpectInputIfQueueNotEmpty() | |
| switchOnExpectInput | back to summary |
|---|---|
| private void switchOnExpectInput() | |
| terminate | back to summary |
|---|---|
| public void terminate(final Termination termination) Implements org. Forcibly closes the input buffer. All the buffered data will be discarded.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Object | |
| private final boolean | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private Buffer |
| content | back to summary |
|---|---|
| private final Object content | |
| isLast | back to summary |
|---|---|
| private final boolean isLast | |
| isService | back to summary |
|---|---|
| private final boolean isService | |
| InputElement | back to summary |
|---|---|
| public InputElement(final Object content, final boolean isLast, final boolean isService) | |
| toBuffer | back to summary |
|---|---|
| private Buffer toBuffer() | |