Class HttpReceiverOverHTTP2
java.lang.Object
org.eclipse.jetty.client.transport.HttpReceiver
org.eclipse.jetty.http2.client.transport.internal.HttpReceiverOverHTTP2
- All Implemented Interfaces:
HTTP2Channel.Client
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
failAndClose
(Throwable failure) Fails the receiver and closes the underlying stream.protected HttpChannelOverHTTP2
protected void
Prepare for the next step after an interim response was read.onReset
(ResetFrame frame, Callback callback) onTimeout
(TimeoutException failure, Promise<Boolean> promise) read
(boolean fillInterestIfNeeded) Reads a chunk of data.Methods inherited from class org.eclipse.jetty.client.transport.HttpReceiver
abort, dispose, getHttpDestination, getHttpExchange, hasContent, isFailed, reset, responseBegin, responseContentAvailable, responseFailure, responseHeader, responseHeaders, responseSuccess, storeCookie, toString
-
Constructor Details
-
HttpReceiverOverHTTP2
-
-
Method Details
-
onInterim
protected void onInterim()Description copied from class:HttpReceiver
Prepare for the next step after an interim response was read.- Specified by:
onInterim
in classHttpReceiver
-
read
Description copied from class:HttpReceiver
Reads a chunk of data.If no data was read,
null
is returned and iffillInterestIfNeeded
istrue
then fill interest is registered.The returned chunk of data may be the last one or an error exactly like
Content.Source.read()
specifies.- Specified by:
read
in classHttpReceiver
- Parameters:
fillInterestIfNeeded
- true to register for fill interest when no data was read.- Returns:
- the chunk of data that was read, or
null
if nothing was read.
-
failAndClose
Description copied from class:HttpReceiver
Fails the receiver and closes the underlying stream.- Specified by:
failAndClose
in classHttpReceiver
- Parameters:
failure
- the failure.
-
getHttpChannel
- Overrides:
getHttpChannel
in classHttpReceiver
-
onDataAvailable
- Specified by:
onDataAvailable
in interfaceHTTP2Channel.Client
-
onReset
- Specified by:
onReset
in interfaceHTTP2Channel.Client
-
onTimeout
- Specified by:
onTimeout
in interfaceHTTP2Channel.Client
-
onFailure
- Specified by:
onFailure
in interfaceHTTP2Channel.Client
-