Errai 3.0.1-SNAPSHOT

org.jboss.as.websockets
Interface WebSocket

All Superinterfaces:
OioWebSocket

public interface WebSocket
extends OioWebSocket

Represents a handle to a single WebSocket connection. It has reader and writer methods to get data in and out.

TODO: Implement support for binary frames.

Author:
Mike Brock

Method Summary
 javax.servlet.http.HttpSession getHttpSession()
          Return the HTTP Session with which this WebSocket is associated.
 javax.servlet.http.HttpServletRequest getServletRequest()
          Get an instance of the initial ServletRequest which was responsible for opening this WebSocket.
 
Methods inherited from interface org.jboss.websockets.oio.OioWebSocket
closeSocket, getSocketID, readFrame, writeFrame
 

Method Detail

getHttpSession

javax.servlet.http.HttpSession getHttpSession()
Return the HTTP Session with which this WebSocket is associated.

Returns:
an instance of the HttpSession

getServletRequest

javax.servlet.http.HttpServletRequest getServletRequest()
Get an instance of the initial ServletRequest which was responsible for opening this WebSocket. Note: that this object remains the same for the duration of the WebSocket session. There is no unique request associated with individual websocket frames.

Returns:
an instance of the HttpServletRequest which opened this WebSocket.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.