I'm using an embedded Jetty server to, among other things, serve a Websocket endpoint. I'm loading it like this:
WebAppContext webAppContext = ...
// server.setHandler call in between here somewhere
ServerContainer container = WebSocketServerContainerInitializer.configureContext(webAppContext);
container.addEndpoint(MyEndpoint.class);
I have to explicitly specify my endpoint class(es) here. Can I instead get Jetty to discover them, using the @ServerEndpoint
annotation on those classes?