# HG changeset patch # User prappo # Date 1510139332 -10800 # Node ID d4b5b95da97278fb1e8d20faafc9328a877d46cf # Parent e62cbcc08caef80385fa540e91e3151a64b41d45 http-client-branch: BodySubscriber (previously known as BodyProcessor) naming consistency fixes diff -r e62cbcc08cae -r d4b5b95da972 src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1AsyncReceiver.java --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1AsyncReceiver.java Wed Nov 08 09:34:56 2017 +0000 +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1AsyncReceiver.java Wed Nov 08 14:08:52 2017 +0300 @@ -97,7 +97,7 @@ * The subscription can be either used directly by the delegate * to request more data (e.g. if the delegate is a header parser), * or can be forwarded to a downstream subscriber (if the delegate - * is a body parser that wraps a response BodyProcessor). + * is a body parser that wraps a response BodySubscriber). * In all cases, it is the responsibility of the delegate to ensure * that request(n) and demand.tryDecrement() are called appropriately. * No data will be sent to {@code tryAsyncReceive} unless diff -r e62cbcc08cae -r d4b5b95da972 src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiMapResult.java --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiMapResult.java Wed Nov 08 09:34:56 2017 +0000 +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiMapResult.java Wed Nov 08 14:08:52 2017 +0300 @@ -35,7 +35,7 @@ * {@Incubating} *

* This is one possible implementation of the aggregate result type {@code } returned - * from {@link HttpClient#sendAsync(HttpRequest,MultiProcessor) }. + * from {@link HttpClient#sendAsync(HttpRequest,HttpResponse.MultiSubscriber) }. * The map is indexed by {@link HttpRequest} and each value is a * {@link java.util.concurrent.CompletableFuture}< * {@link HttpResponse}{@code }> @@ -46,7 +46,7 @@ * {@link HttpClient#sendAsync(HttpRequest, * HttpResponse.MultiSubscriber) HttpClient.sendAsync(}{@link * HttpResponse.MultiSubscriber#asMap(java.util.function.Function) - * MultiProcessor.asMap(Function)}) + * MultiSubscriber.asMap(Function)}) * * @param the response body type for all responses */ diff -r e62cbcc08cae -r d4b5b95da972 src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseContent.java --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseContent.java Wed Nov 08 09:34:56 2017 +0000 +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseContent.java Wed Nov 08 14:08:52 2017 +0300 @@ -54,10 +54,10 @@ ResponseContent(HttpConnection connection, int contentLength, HttpHeaders h, - HttpResponse.BodySubscriber userProcessor, + HttpResponse.BodySubscriber userSubscriber, Runnable onFinished) { - this.pusher = userProcessor; + this.pusher = userSubscriber; this.contentLength = contentLength; this.headers = h; this.onFinished = onFinished; @@ -97,7 +97,7 @@ } // Returns a parser that will take care of parsing the received byte - // buffers and forward them to the BodyProcessor. + // buffers and forward them to the BodySubscriber. // When the parser is done, it will call onComplete. // If parsing was successful, the throwable parameter will be null. // Otherwise it will be the exception that occurred diff -r e62cbcc08cae -r d4b5b95da972 src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java Wed Nov 08 09:34:56 2017 +0000 +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java Wed Nov 08 14:08:52 2017 +0300 @@ -207,7 +207,7 @@ } } - // Callback invoked after the Response BodyProcessor has consumed the + // Callback invoked after the Response BodySubscriber has consumed the // buffers contained in a DataFrame. // Returns true if END_STREAM is reached, false otherwise. private boolean consumed(DataFrame df) { @@ -1034,7 +1034,7 @@ void completeResponse(Response r) { Log.logResponse(r::toString); pushCF.complete(r); // not strictly required for push API - // start reading the body using the obtained BodyProcessor + // start reading the body using the obtained BodySubscriber CompletableFuture start = new MinimalFuture<>(); start.thenCompose( v -> readBodyAsync(getPushHandler(), false, getExchange().executor())) .whenComplete((T body, Throwable t) -> {