Class HttpReceiverOverFCGI
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
dispose()
Disposes the state of this HttpReceiver.void
failAndClose
(Throwable failure) Fails the receiver and closes the underlying stream.protected HttpChannelOverFCGI
void
Prepare for the next step after an interim response was read.read
(boolean fillInterestIfNeeded) Reads a chunk of data.protected void
reset()
Resets the state of this HttpReceiver.protected void
responseBegin
(HttpExchange exchange) Method to be invoked when the response status code is available.protected void
responseContentAvailable
(HttpExchange exchange) Method to be invoked when response content is available to be read.protected void
responseFailure
(Throwable failure, Promise<Boolean> promise) Method to be invoked when the response is failed.protected void
responseHeader
(HttpExchange exchange, HttpField field) Method to be invoked when a response HTTP header is available.protected void
responseHeaders
(HttpExchange exchange) Method to be invoked after all response HTTP headers are available.Methods inherited from class org.eclipse.jetty.client.transport.HttpReceiver
abort, getHttpDestination, getHttpExchange, hasContent, isFailed, responseSuccess, storeCookie, toString
-
Constructor Details
-
HttpReceiverOverFCGI
-
-
Method Details
-
onInterim
public void onInterim()Description copied from class:HttpReceiver
Prepare for the next step after an interim response was read.- Specified by:
onInterim
in classHttpReceiver
-
reset
protected void reset()Description copied from class:HttpReceiver
Resets the state of this HttpReceiver.Subclasses should override (but remember to call
super
) to reset their own state.Either this method or
HttpReceiver.dispose()
is called.- Overrides:
reset
in classHttpReceiver
-
dispose
protected void dispose()Description copied from class:HttpReceiver
Disposes the state of this HttpReceiver.Subclasses should override (but remember to call
super
) to dispose their own state.Either this method or
HttpReceiver.reset()
is called.- Overrides:
dispose
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
-
responseBegin
Description copied from class:HttpReceiver
Method to be invoked when the response status code is available.Subclasses must have set the response status code on the
Response
object of theHttpExchange
prior invoking this method.This method takes case of notifying
Response.BeginListener
s.- Overrides:
responseBegin
in classHttpReceiver
- Parameters:
exchange
- the HTTP exchange
-
responseHeader
Description copied from class:HttpReceiver
Method to be invoked when a response HTTP header is available.Subclasses must not have added the header to the
Response
object of theHttpExchange
prior invoking this method.This method takes case of notifying
Response.HeaderListener
s and storing cookies.- Overrides:
responseHeader
in classHttpReceiver
- Parameters:
exchange
- the HTTP exchangefield
- the response HTTP field
-
responseHeaders
Description copied from class:HttpReceiver
Method to be invoked after all response HTTP headers are available.This method takes care of notifying
Response.HeadersListener
s.- Overrides:
responseHeaders
in classHttpReceiver
- Parameters:
exchange
- the HTTP exchange
-
responseContentAvailable
Description copied from class:HttpReceiver
Method to be invoked when response content is available to be read.This method takes care of ensuring the
Content.Source
passed toResponse.ContentSourceListener.onContentSource(Response, Content.Source)
calls the demand callback. The call to the demand callback is serialized with other events.- Overrides:
responseContentAvailable
in classHttpReceiver
-
responseFailure
Description copied from class:HttpReceiver
Method to be invoked when the response is failed.This method takes care of notifying
Response.FailureListener
s.- Overrides:
responseFailure
in classHttpReceiver
- Parameters:
failure
- the response failure
-