Jetty 12 : Strengthen WebSocket upgrade contract and other improvements
- Strengthen contract of WebSocket upgrade methods by defining in javadoc that an error response needs to be generated by them if they are not returning a WebSocket Object.
- Remove
WebSocketNegotiation from the public API, use (req, resp, cb) style method in WebSocketNegotiator instead.
- Factor out a
isWebSocketUpgradeRequest method for the Handshaker so that the Upgrade Servlet/Filters can check it is really an upgrade attempt before allocating the Blocking Callback and other resources.
- Add
Attachment interface onto the Servlet Request objects so the wrapped HttpServletRequest and HttpServletResponse can be stored there and retrieved once websocket-core calls back the API layer.