[jsr356-experts] connectToServer

From: Scott Ferguson <ferg_at_caucho.com>
Date: Mon, 14 Jan 2013 08:32:56 -0800

The new connectToServer is difficult to use.

Instead of a Class parameter, it should be an object. The container
shouldn't need to instantiate the object, and the Class model makes it
difficult to connect between the client application and the client
endpoint. (Because any shared state/object needs to be passed through a
custom ClientEndpointConfiguration.)

The API should be simplified to:

WebSocketContainer {
   Session connectToServer(Object endpoint, URI path);

   Session connectToServer(Object endpoint, URI path,
ClientEndpointConfiguration cec);

If the "endpoint" object is already of type Endpoint, it's used
directly. Otherwise, a skeleton/proxy is created, i.e. annotation stuff.

There's no need for separate methods for Endpoint vs annotation.

-- Scott