Package org.apache.hc.core5.http.nio
Interface AsyncResponseProducer
-
- All Superinterfaces:
AsyncDataProducer
,ResourceHolder
- All Known Implementing Classes:
BasicResponseProducer
public interface AsyncResponseProducer extends AsyncDataProducer
Abstract asynchronous response producer.- Since:
- 5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
failed(java.lang.Exception cause)
Triggered to signal a failure in data generation.void
sendResponse(ResponseChannel channel, HttpContext context)
Triggered to signal the ability of the underlying response channel to accept response messages.-
Methods inherited from interface org.apache.hc.core5.http.nio.AsyncDataProducer
available, produce
-
Methods inherited from interface org.apache.hc.core5.http.nio.ResourceHolder
releaseResources
-
-
-
-
Method Detail
-
sendResponse
void sendResponse(ResponseChannel channel, HttpContext context) throws HttpException, java.io.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
- the response channel capable to accepting response messages.context
- the actual execution context.- Throws:
HttpException
java.io.IOException
-
failed
void failed(java.lang.Exception cause)
Triggered to signal a failure in data generation.- Parameters:
cause
- the cause of the failure.
-
-