http-client-branch: BodySubscriber (previously known as BodyProcessor) naming consistency fixes
--- 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
--- 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}
* <p>
* This is one possible implementation of the aggregate result type {@code <U>} 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 <V>}>
@@ -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 <V> the response body type for all responses
*/
--- 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
--- 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<Void> start = new MinimalFuture<>();
start.thenCompose( v -> readBodyAsync(getPushHandler(), false, getExchange().executor()))
.whenComplete((T body, Throwable t) -> {