org.atmosphere.cpr
Class HttpServletRequestWebSocketProcessor

java.lang.Object
  extended by org.atmosphere.cpr.WebSocketProcessor
      extended by org.atmosphere.cpr.HttpServletRequestWebSocketProcessor
All Implemented Interfaces:
Serializable

public class HttpServletRequestWebSocketProcessor
extends WebSocketProcessor
implements Serializable

Like the AsynchronousProcessor class, this class is responsible for dispatching WebSocket messages to the proper WebSocketSupport implementation by wrapping the Websocket message's bytes within an HttpServletRequest.

The content-type is defined using AtmosphereServlet.WEBSOCKET_CONTENT_TYPE property The method is defined using AtmosphereServlet.WEBSOCKET_METHOD property

Author:
Jeanfrancois Arcand
See Also:
Serialized Form

Nested Class Summary
static class HttpServletRequestWebSocketProcessor.ByteInputStream
           
 
Constructor Summary
HttpServletRequestWebSocketProcessor(AtmosphereServlet atmosphereServlet, WebSocketSupport webSocketSupport)
           
 
Method Summary
 void broadcast(byte[] data, int offset, int length)
           
 void broadcast(String data)
           
 
Methods inherited from class org.atmosphere.cpr.WebSocketProcessor
atmosphereServlet, close, connect, request, resource, toString, webSocketSupport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpServletRequestWebSocketProcessor

public HttpServletRequestWebSocketProcessor(AtmosphereServlet atmosphereServlet,
                                            WebSocketSupport webSocketSupport)
Method Detail

broadcast

public void broadcast(String data)
Specified by:
broadcast in class WebSocketProcessor

broadcast

public void broadcast(byte[] data,
                      int offset,
                      int length)
Specified by:
broadcast in class WebSocketProcessor


Copyright © 2011. All Rights Reserved.