-
Notifications
You must be signed in to change notification settings - Fork 43
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
Fix issue-211 - Add method for use by front controller #375
Conversation
There needs to be some restrictions in place to protect previously registered Using this API cannot replace a previously registered |
Agreed. This API isn't meant to trigger a registration. I think of it more like the equivalent of a dispatch to a WebSocket endpoint. I can clarify the language around that. |
Don't we have text saying |
I've tried to clarify the language on upgrade. I've also removed the "deployment only during initialisation" restriction. I think I have updated the spec everywhere required. |
* @throws DeploymentException if a configuration error prevents the establishment of a WebSocket connection | ||
*/ | ||
public void upgradeHttpToWebSocket(Object httpServletRequest, Object httpServletResponse, ServerEndpointConfig sec, | ||
Map<String,String> pathParameters) throws IOException, DeploymentException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be Map<String, String[]> as in ServletRequest#getParameterMap?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Different concept. See section 4.3 of the WebSocket spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to the relevant section in the spec - https://github.com/eclipse-ee4j/websocket-api/blob/2.0.0-RELEASE/spec/src/main/asciidoc/WebSocket.adoc#43-pathparam
This is the map of URI Template Path parameters.
So if the websocket endpoint declared ...
@ServerEndpoint("/bookings/{hotel}/{guest-id}")
And the websocket upgrade request arrived at resource path of ...
/bookings/fernando/808
This upgrade's path parameters would be ...
Map Entry | Map Value |
---|---|
"hotel" | "fernando" |
"guest-id" | "808" |
This has nothing to do with Servlet form / query parameters.
No description provided.