Trying to open sockjs connection using spring SockJsClient. My sockjs server is in production environment and uses serverId mapping. SockJsClient does not allow serverId and implicitly generates some random value (SockJsUrlInfo.getServerId). Allow some customization to pass serverId explicitly. I can't even extend SockJsClient because it does not contain any methods or constructors to override.
Comment From: snicoll
Thanks for the suggestion. It looks like that offering a protected method in SockJsClient
that allows to create your own SockJsUrlInfo
based on the url could be a good way out.
Comment From: OverDrone
Yes, something like that. 1. SockJsClient protected method: SockJsUrlInfo buildUrlInfo(URI url) which should be called from SockJsClient.execute instead of new SockJsUrlInfo(URI url) 2. Add constructor SockJsUrlInfo(URI url, String serverId) and a little optimization: assign serverId in constructor SockJsUrlInfo(URI url) instead of lazy calculating it in getServerId because this method will be called anyway.
I can create PR if you like.