Package java.net.http

Interface HttpResponse.PushPromiseHandler<T>

Type Parameters:
T - the push promise response body type
Enclosing interface:
HttpResponse<T>

public static interface HttpResponse.PushPromiseHandler<T>
A handler for push promises.

A push promise is a synthetic request sent by an HTTP/2 server when retrieving an initiating client-sent request. The server has determined, possibly through inspection of the initiating request, that the client will likely need the promised resource, and hence pushes a synthetic push request, in the form of a push promise, to the client. The client can choose to accept or reject the push promise request.

A push promise request may be received up to the point where the response body of the initiating client-sent request has been fully received. The delivery of a push promise response, however, is not coordinated with the delivery of the response to the initiating client-sent request.

Since:
11