RFR JDK-8157273: Simplify outgoing messages queueing policy in WebSocket API

Chris Hegarty chris.hegarty at oracle.com
Wed Jun 15 12:57:19 UTC 2016


> On 14 Jun 2016, at 17:24, Simone Bordet <simone.bordet at gmail.com> wrote:
> 
>> ...
> 
> However, you still want to use the CFs for exception reporting.

Of course. We should not introduce a model that is at odds with how exceptions
are handled in this API. How about:

 1) Leave the sendXXX methods as they are, no change from what is in jdk9/dev now.

 2) Add, and specify, a default auto-pong mechanism. Leaving onPing as effectively
     a notification of a received ping message with access to its data, if any. No action,
     from user code, is required to reply to received pings, the implementation will do
     the right thing.   Any errors encountered in the auto-pong mechanism can be 
     notified through onError.

-Chris.


More information about the net-dev mailing list