Preliminary RFR JDK-8159053: Improve onPing/onClose behavior

Chris Hegarty chris.hegarty at oracle.com
Tue Jun 21 05:42:31 UTC 2016


I think this is good Pavel, just a few minor comments.

> On 17 Jun 2016, at 19:37, Pavel Rappo <pavel.rappo at oracle.com> wrote:
> 
> ….
> * <p> The WebSocket implementation responds to the received Ping
> * message using a strategy of its choice, but withing the boundaries of
                                                                                    ^  WITHIN
> * the WebSocket Protocol. It may call this method after handling the
> * Ping message or before doing so. In other words no particular
> * ordering is guaranteed. If an error occurs while implementation
> * handles this Ping message, then {@code onError} will be invoked with
> * this error.
> *
> * <p> For more information on handling Ping messages see RFC 6455 sections
> * <a href="https://tools.ietf.org/html/rfc6455#section-5.5.2">5.5.2. Ping</a> and
> * <a href="https://tools.ietf.org/html/rfc6455#section-5.5.3">5.5.2. Pong</a>.
                                                                                                        ^ 5.5.3

The links here to the RFC are good, rather than repeating the text in the javadoc.

The wording you have is fine, but it could be a little clearer by adding the work
‘automatically’; “responds automatically”, or “… responds to the received Ping
message automatically”.  To make it obvious that some action will be taken 
without any intervention from the user ( onPing is effectively a notification 
mechanism of the “Application Data” ).

-Chris.



More information about the net-dev mailing list