@WebSocketEndpoint value() should be defaulted to "/" and changed to path()
Some thinking of valid deployment scenarios on scenarios.
3 server side websockets.
@WebSocketEndpoint(subprotocols={"chat"})
public class ChatSocket {
}
@WebSocketEdnpoint(subprotocols={"echo"})
public class EchoSocket {
}
@WebSocketEndpoint(subprotocols={"admin"})
public class AdminSocket {
}
These would be endpoints on the same path and value, but with different sub
protocols.
For a client side operation, providing one these annotated classes would
result in the client implementation sending the subprotocol list out on the
upgrade.
For server side operation, a request on the path "/" would match multiple
endpoints, and then the request subprotocol list would be interrogated on
each endpoint to find out which endpoint to hook up to the session.
This would allow @WebSocketEndpoint to work both on server and client.
Where on client the current value() (hopefully changed to path()) is
ignored.
--
Joakim Erdfelt <joakim_at_intalio.com>
webtide.com <http://www.webtide.com/>
Developer advice, services and support
from the Jetty & CometD experts
eclipse.org/jetty - cometd.org
On Wed, Feb 13, 2013 at 10:46 AM, Joakim Erdfelt <joakim_at_intalio.com> wrote:
> It seems that Client side only websockets cannot be annotated with
> @WebSocketEndpoint as that is now a server side only annotation.
>
> Are we going to get an annotation for the client side too?
> Or can we get a unified annotation for both?
>
> --
> Joakim Erdfelt <joakim_at_intalio.com>
> webtide.com <http://www.webtide.com/>
> Developer advice, services and support
> from the Jetty & CometD experts
> eclipse.org/jetty - cometd.org
>