Atmosphere/atmosphere — pull request #1490 by aleksandarn (2014-03-04 14:17:15+00:00)
Title: Passing HttpServletRequest to the WebSocketProcessor#handshake in Glassfish 3.x

By the time the server reaches the handshake method, the clietn receives onOpen notification.
If you write any error result code and status message to the request and than return "false" from the handshake method, the client websocket is closed - onClose callback is called , but no status code or error message is delivered to the client.