org.atmosphere.websocket
Class WebSocketProcessor
java.lang.Object
org.atmosphere.websocket.WebSocketProcessor
- All Implemented Interfaces:
- Serializable
public class WebSocketProcessor
- extends Object
- implements Serializable
Like the AsynchronousProcessor class, this class is responsible for dispatching WebSocket request to the
proper WebSocket implementation. This class can be extended in order to support any protocol
running on top websocket.
- Author:
- Jeanfrancois Arcand
- See Also:
- Serialized Form
WebSocketProcessor
public WebSocketProcessor(AtmosphereServlet atmosphereServlet,
WebSocket webSocket,
WebSocketProtocol webSocketProtocol)
dispatch
public final void dispatch(javax.servlet.http.HttpServletRequest request)
throws IOException
- Throws:
IOException
invokeWebSocketProtocol
public void invokeWebSocketProtocol(String webSocketMessage)
invokeWebSocketProtocol
public void invokeWebSocketProtocol(byte[] data,
int offset,
int length)
dispatch
protected final void dispatch(javax.servlet.http.HttpServletRequest request,
AtmosphereResponse<?> r)
- Dispatch to request/response to the
CometSupport implementation as it was a normal HTTP request.
- Parameters:
request - a HttpServletRequestr - a HttpServletResponse
webSocket
public WebSocket webSocket()
close
public void close()
toString
public String toString()
- Overrides:
toString in class Object
notifyListener
public void notifyListener(WebSocketEventListener.WebSocketEvent event)
configureHeader
public static final Map<String,String> configureHeader(javax.servlet.http.HttpServletRequest request)
Copyright © 2011. All Rights Reserved.