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

public Interface AsyncClientExchangeHandler

extends AsyncDataExchangeHandler
Known Direct Implementers
org.apache.hc.core5.http.nio.support.BasicClientExchangeHandler
Imports
java.io.IOException, org.apache.hc.core5.http.EntityDetails, .HttpException, .HttpResponse, org.apache.hc.core5.http.protocol.HttpContext

Abstract asynchronous client side message exchange handler that acts as a request producer and a response consumer.
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public void
cancel()

Triggered to cancel the message exchange.

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

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

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
)

Triggered to signal receipt of a response message head.

public void
produceRequest(RequestChannel
the request channel capable to accepting a request message.
channel
,
HttpContext
the actual execution context.
context
)

Triggered to signal the ability of the underlying request channel to accept a request messages.

Inherited from org.apache.hc.core5.http.nio.AsyncDataExchangeHandler:
failed

Method Detail

cancelback to summary
public void cancel()

Triggered to cancel the message exchange.

consumeInformationback to summary
public void consumeInformation(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.

consumeResponseback to summary
public void consumeResponse(HttpResponse response, EntityDetails entityDetails, HttpContext context) 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.

produceRequestback to summary
public void produceRequest(RequestChannel channel, HttpContext context) throws HttpException, IOException

Triggered to signal the ability of the underlying request channel to accept a request messages. The data producer can choose to send a request message immediately inside the call or asynchronously at some later point.

Parameters
channel:RequestChannel

the request channel capable to accepting a request message.

context:HttpContext

the actual execution context.