Top Description Methods
org.apache.hc.core5.http.nio

public Interface AsyncResponseConsumer<T>

extends AsyncDataConsumer
Known Direct Implementers
org.apache.hc.core5.http.nio.support.AbstractAsyncResponseConsumer, org.apache.hc.core5.http.nio.support.BasicResponseConsumer
Type Parameters
<T>
response representation.
Imports
java.io.IOException, org.apache.hc.core5.concurrent.FutureCallback, org.apache.hc.core5.http.EntityDetails, .HttpException, .HttpResponse, org.apache.hc.core5.http.protocol.HttpContext

Abstract asynchronous response consumer.
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public void
consumeResponse(HttpResponse
the response message head.
response
,
EntityDetails
the response entity details or null if the response does not enclose an entity.
entityDetails
,
HttpContext
the actual execution context.
context
,
FutureCallback<T>
the result callback called when response processing has been completed successfully or unsuccessfully.
resultCallback
)

Triggered to signal receipt of a response message head.

public void
failed(Exception
the cause of the failure.
cause
)

Triggered to signal a failure in data processing.

public void
informationResponse(HttpResponse
the intermediate (1xx) HTTP response.
response
,
HttpContext
the actual execution context.
context
)

Triggered to signal receipt of an intermediate (1xx) HTTP response.

Inherited from org.apache.hc.core5.http.nio.AsyncDataConsumer:
consumestreamEndupdateCapacity

Method Detail

consumeResponseback to summary
public void consumeResponse(HttpResponse response, EntityDetails entityDetails, HttpContext context, FutureCallback<T> resultCallback) throws HttpException, IOException

Triggered to signal receipt of a response message head.

Parameters
response:HttpResponse

the response message head.

entityDetails:EntityDetails

the response entity details or null if the response does not enclose an entity.

context:HttpContext

the actual execution context.

resultCallback:FutureCallback<T>

the result callback called when response processing has been completed successfully or unsuccessfully.

failedback to summary
public void failed(Exception cause)

Triggered to signal a failure in data processing.

Parameters
cause:Exception

the cause of the failure.

informationResponseback to summary
public void informationResponse(HttpResponse response, HttpContext context) throws HttpException, IOException

Triggered to signal receipt of an intermediate (1xx) HTTP response.

Parameters
response:HttpResponse

the intermediate (1xx) HTTP response.

context:HttpContext

the actual execution context.