http-client-branch: add api/impl notes to WebSocket onClose http-client-branch
authorchegar
Wed, 24 Jan 2018 12:26:15 +0000
branchhttp-client-branch
changeset 56039 01739771e48b
parent 56038 e663f24e3020
child 56040 f8eabb9a5c0f
http-client-branch: add api/impl notes to WebSocket onClose
src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WebSocket.java
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WebSocket.java	Tue Jan 23 14:10:14 2018 +0000
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WebSocket.java	Wed Jan 24 12:26:15 2018 +0000
@@ -419,6 +419,12 @@
          * {@code CompletionStage} returned from it completes exceptionally,
          * the resulting behaviour is undefined.
          *
+         * @apiNote Returning a {@code CompletionStage} that never completes,
+         * effectively disables the automatic closure of the output.
+         *
+         * @implSpec The default implementation of this method returns
+         * {@code null}, signaling that the output may be closed.
+         *
          * @param webSocket
          *         the WebSocket on which the message has been received
          * @param statusCode