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

public Interface AsyncResponseProducer

extends AsyncDataProducer
Known Direct Implementers
org.apache.hc.core5.http.nio.support.BasicResponseProducer
Imports
java.io.IOException, org.apache.hc.core5.http.HttpException, org.apache.hc.core5.http.protocol.HttpContext

Abstract asynchronous response producer.
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public void
failed(Exception
the cause of the failure.
cause
)

Triggered to signal a failure in data generation.

public void
sendResponse(ResponseChannel
the response channel capable to accepting response messages.
channel
,
HttpContext
the actual execution context.
context
)

Triggered to signal the ability of the underlying response channel to accept response messages.

Inherited from org.apache.hc.core5.http.nio.AsyncDataProducer:
availableproduce

Method Detail

failedback to summary
public void failed(Exception cause)

Triggered to signal a failure in data generation.

Parameters
cause:Exception

the cause of the failure.

sendResponseback to summary
public void sendResponse(ResponseChannel channel, HttpContext context) throws HttpException, IOException

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

Parameters
channel:ResponseChannel

the response channel capable to accepting response messages.

context:HttpContext

the actual execution context.