public final class ReactiveResponseConsumer extends Object implements AsyncResponseConsumer<ReactiveApacheHttpResponse>
| 构造器和说明 |
|---|
ReactiveResponseConsumer(HttpResponseHandler handler)
Creates a
ReactiveResponseConsumer. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
consume(ByteBuffer src)
Triggered to pass incoming data to the data consumer.
|
void |
consumeResponse(HttpResponse response,
EntityDetails entityDetails,
HttpContext httpContext,
FutureCallback<ReactiveApacheHttpResponse> resultCallback)
Triggered to signal receipt of a response message head.
|
void |
failed(Exception cause)
Triggered to signal a failure in data processing.
|
EntityDetails |
getEntityDetails()
Returns the response entity details.
|
HttpResponse |
getInformationResponse()
Returns the intermediate (1xx) HTTP response if one was received.
|
List<Header> |
getTrailers()
Returns the trailers received at the end of the response.
|
void |
informationResponse(HttpResponse response,
HttpContext httpContext)
Triggered to signal receipt of an intermediate (1xx) HTTP response.
|
void |
releaseResources() |
void |
streamEnd(List<? extends Header> trailers)
Triggered to signal termination of the data stream.
|
void |
updateCapacity(CapacityChannel capacityChannel)
Triggered to signal ability of the underlying data stream to receive
data capacity update.
|
public ReactiveResponseConsumer(HttpResponseHandler handler)
ReactiveResponseConsumer.public HttpResponse getInformationResponse()
null if none.public EntityDetails getEntityDetails()
null if none.public List<Header> getTrailers()
public void consumeResponse(HttpResponse response, EntityDetails entityDetails, HttpContext httpContext, FutureCallback<ReactiveApacheHttpResponse> resultCallback)
AsyncResponseConsumerconsumeResponse 在接口中 AsyncResponseConsumer<ReactiveApacheHttpResponse>response - the response message head.entityDetails - the response entity details or null if the response
does not enclose an entity.httpContext - the actual execution context.resultCallback - the result callback called when response processing
has been completed successfully or unsuccessfully.public void informationResponse(HttpResponse response, HttpContext httpContext)
AsyncResponseConsumerinformationResponse 在接口中 AsyncResponseConsumer<ReactiveApacheHttpResponse>response - the intermediate (1xx) HTTP response.httpContext - the actual execution context.public void failed(Exception cause)
AsyncResponseConsumerfailed 在接口中 AsyncResponseConsumer<ReactiveApacheHttpResponse>cause - the cause of the failure.public void updateCapacity(CapacityChannel capacityChannel) throws IOException
AsyncDataConsumerupdateCapacity 在接口中 AsyncDataConsumercapacityChannel - the channel for capacity updates.IOExceptionpublic void consume(ByteBuffer src) throws IOException
AsyncDataConsumerconsume 在接口中 AsyncDataConsumersrc - data source.IOExceptionpublic void streamEnd(List<? extends Header> trailers)
AsyncDataConsumerstreamEnd 在接口中 AsyncDataConsumertrailers - data stream trailers.public void releaseResources()
releaseResources 在接口中 ResourceHolderCopyright © 2023. All rights reserved.