use of org.eclipse.jetty.websocket.servlet.WebSocketServletFactory in project cxf by apache.
the class Jetty9WebSocketDestination method getWebSocketFactory.
public synchronized WebSocketServletFactory getWebSocketFactory(Server server) {
if (webSocketFactory == null) {
webSockethandler = new WebSocketHandler() {
@Override
public void configure(WebSocketServletFactory factory) {
}
};
try {
webSockethandler.setServer(server);
webSockethandler.start();
} catch (Exception e) {
e.printStackTrace();
}
webSocketFactory = webSockethandler.getWebSocketFactory();
webSocketFactory.setCreator(new Creator());
}
return webSocketFactory;
}
Aggregations