Uh oh!
There was an error while loading. Please reload this page.
Add path params in websocket uri - #397
Conversation
coveralls
commented
Sep 28, 2017
kant111
commented
Oct 1, 2017
How to access the value for "room" in the above url? Can we have annotations similar to the HTTP route handling in pippo. |
decebals
commented
Oct 2, 2017
The path parameters are available in WebSocketMatch. The easy mode to expose these parameters is via WebSocketContext (add a method, eventually use ParameterValue as wrapper - to have conversion methods - similar with Request class)
Do you talk about pippo-controller? |
coveralls
commented
Nov 10, 2017
coveralls
commented
Nov 10, 2017
decebals
commented
Nov 10, 2017
You can use My work on this feature is done. If everything is OK, I will merge this PR and I will release a new version. |
kant111
commented
Nov 10, 2017
@decebals Thanks much! I went with another framework because of deadlines but appreciate your effort! will try to consider Pippo next time when I get an opportunity! |
This PR contains a functional POC (prof of concept) for #395.
The code works but need some adjustment.
For Undertow:
For Jetty the code is similar with the code presented in #360 (comment).
Also this PR comes with a hidden nice feature,
UriMatcherwithDefaultUriMatcher. So, theDefaultRouterwas spitted in two parts. It's more easy to implement a custom router with uri matcher (maybe some one wants another notation for path parameters or supply a more fast uri matching algorithm).In
WebSocketContextyou will can access the parameters value (I have already these information), similar with the approach used in Request. Also,WebSocketContextwill contain other information like session, request header.