setCreator(new WebSocketCreator() {
// @Override 9.0.x
public Object createWebSocket(UpgradeRequest upgradeRequest, UpgradeResponse upgradeResponse) {
ServletWebSocketRequest r = ServletWebSocketRequest.class.cast(upgradeRequest);
r.getExtensions().clear();
if (!webSocketProcessor.handshake(request)) {
try {
response.sendError(HttpServletResponse.SC_FORBIDDEN, "WebSocket requests rejected.");
} catch (IOException e) {