Skip to content
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

Closed
glassfishrobot opened this issue Jan 17, 2013 · 8 comments
Closed

WebSocketContainer.connectToServer ease of use / API change #116

glassfishrobot opened this issue Jan 17, 2013 · 8 comments

Comments

@glassfishrobot
Copy link

(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.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by dannycoward

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Issue-Links:
is related to
WEBSOCKET_SPEC-69

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Was assigned to dannycoward

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
dannycoward said:
awaiting last feedback on whether to add these methods

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
dannycoward said:
This has been added in v014, with the disclaimers that dependency injection may not work.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Marked as fixed on Friday, March 1st 2013, 2:20:16 pm

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA WEBSOCKET_SPEC-116

@glassfishrobot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant