-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebSocketContainer.connectToServer ease of use / API change #116
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
(from Scott)
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.
The text was updated successfully, but these errors were encountered: