Package org.apache.hc.client5.http
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.
@FunctionalInterface public interface EarlyHintsListenerCallback interface for receiving103 Early Hintsinformational responses emitted by the server before the final response.The listener may be invoked multiple times per request, once for each
103received. 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonEarlyHints(org.apache.hc.core5.http.HttpResponse hints, org.apache.hc.core5.http.protocol.HttpContext context)Called for each received103 Early Hintsinformational response.
-
-
-
Method Detail
-
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, java.io.IOExceptionCalled 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 hintsjava.io.IOException- to signal an I/O error while handling hints
-
-