インタフェースjava.net.http.HttpResponse.PushPromiseHandlerの
使用
-
java.net.httpでのHttpResponse.PushPromiseHandlerの使用
修飾子と型メソッド説明static <T> HttpResponse.PushPromiseHandler<T>
HttpResponse.PushPromiseHandler.of
(Function<HttpRequest, HttpResponse.BodyHandler<T>> pushPromiseHandler, ConcurrentMap<HttpRequest, CompletableFuture<HttpResponse<T>>> pushPromisesMap) 指定されたマップに、プッシュ・プロミスおよびそのレスポンスを累積する、プッシュ・プロミス・ハンドラを返します。修飾子と型メソッド説明abstract <T> CompletableFuture<HttpResponse<T>>
HttpClient.sendAsync
(HttpRequest request, HttpResponse.BodyHandler<T> responseBodyHandler, HttpResponse.PushPromiseHandler<T> pushPromiseHandler) 指定されたレスポンス本文ハンドラとともにこのクライアントを使用して、指定されたリクエストを非同期に送信し、プッシュ・プロミス・ハンドラをプッシュします。