Class HttpReceiverOverFCGI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddispose()Disposes the state of this HttpReceiver.voidfailAndClose(Throwable failure) Fails the receiver and closes the underlying stream.protected HttpChannelOverFCGIvoidPrepare for the next step after an interim response was read.read(boolean fillInterestIfNeeded) Reads a chunk of data.protected voidreset()Resets the state of this HttpReceiver.protected voidresponseBegin(HttpExchange exchange) Method to be invoked when the response status code is available.protected voidresponseContentAvailable(HttpExchange exchange) Method to be invoked when response content is available to be read.protected voidresponseFailure(Throwable failure, Promise<Boolean> promise) Method to be invoked when the response is failed.protected voidresponseHeader(HttpExchange exchange, HttpField field) Method to be invoked when a response HTTP header is available.protected voidresponseHeaders(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:HttpReceiverPrepare for the next step after an interim response was read.- Specified by:
onInterimin classHttpReceiver
-
reset
protected void reset()Description copied from class:HttpReceiverResets 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:
resetin classHttpReceiver
-
dispose
protected void dispose()Description copied from class:HttpReceiverDisposes 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:
disposein classHttpReceiver
-
read
Description copied from class:HttpReceiverReads a chunk of data.If no data was read,
nullis returned and iffillInterestIfNeededistruethen 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:
readin classHttpReceiver- Parameters:
fillInterestIfNeeded- true to register for fill interest when no data was read.- Returns:
- the chunk of data that was read, or
nullif nothing was read.
-
failAndClose
Description copied from class:HttpReceiverFails the receiver and closes the underlying stream.- Specified by:
failAndClosein classHttpReceiver- Parameters:
failure- the failure.
-
getHttpChannel
- Overrides:
getHttpChannelin classHttpReceiver
-
responseBegin
Description copied from class:HttpReceiverMethod to be invoked when the response status code is available.Subclasses must have set the response status code on the
Responseobject of theHttpExchangeprior invoking this method.This method takes case of notifying
Response.BeginListeners.- Overrides:
responseBeginin classHttpReceiver- Parameters:
exchange- the HTTP exchange
-
responseHeader
Description copied from class:HttpReceiverMethod to be invoked when a response HTTP header is available.Subclasses must not have added the header to the
Responseobject of theHttpExchangeprior invoking this method.This method takes case of notifying
Response.HeaderListeners and storing cookies.- Overrides:
responseHeaderin classHttpReceiver- Parameters:
exchange- the HTTP exchangefield- the response HTTP field
-
responseHeaders
Description copied from class:HttpReceiverMethod to be invoked after all response HTTP headers are available.This method takes care of notifying
Response.HeadersListeners.- Overrides:
responseHeadersin classHttpReceiver- Parameters:
exchange- the HTTP exchange
-
responseContentAvailable
Description copied from class:HttpReceiverMethod to be invoked when response content is available to be read.This method takes care of ensuring the
Content.Sourcepassed toResponse.ContentSourceListener.onContentSource(Response, Content.Source)calls the demand callback. The call to the demand callback is serialized with other events.- Overrides:
responseContentAvailablein classHttpReceiver
-
responseFailure
Description copied from class:HttpReceiverMethod to be invoked when the response is failed.This method takes care of notifying
Response.FailureListeners.- Overrides:
responseFailurein classHttpReceiver- Parameters:
failure- the response failure
-