Interface EarlyHintsListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback interface for receiving
103 Early Hints
informational responses emitted by the server before the final response.
The listener may be invoked multiple times per request, once for each
103 received. It is never invoked for the final (non-1xx) response.
Implementations should be fast and non-blocking. If heavy work is needed, offload it to an application executor.
- Since:
- 5.6
-
Method Summary
Modifier and TypeMethodDescriptionvoidonEarlyHints(org.apache.hc.core5.http.HttpResponse hints, org.apache.hc.core5.http.protocol.HttpContext context) Called for each received103 Early Hintsinformational response.
-
Method Details
-
onEarlyHints
void onEarlyHints(org.apache.hc.core5.http.HttpResponse hints, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException, IOException Called for each received103 Early Hintsinformational response.- Parameters:
hints- the103response object as received on the wirecontext- the current execution context (nevernull)- Throws:
org.apache.hc.core5.http.HttpException- to signal an HTTP-layer error while handling hintsIOException- to signal an I/O error while handling hints
-