org.atmosphere.websocket.protocol
Class SimpleHttpProtocol
java.lang.Object
org.atmosphere.websocket.WebSocketProcessor
org.atmosphere.websocket.protocol.SimpleHttpProtocol
- All Implemented Interfaces:
- Serializable
public class SimpleHttpProtocol
- extends WebSocketProcessor
- implements Serializable
Like the AsynchronousProcessor class, this class is responsible for dispatching WebSocket messages to the
proper WebSocket implementation by wrapping the Websocket message's bytes within
an HttpServletRequest.
The content-type is defined using ApplicationConfig.WEBSOCKET_CONTENT_TYPE property
The method is defined using ApplicationConfig.WEBSOCKET_METHOD property
- Author:
- Jeanfrancois Arcand
- See Also:
- Serialized Form
SimpleHttpProtocol
public SimpleHttpProtocol(AtmosphereServlet atmosphereServlet,
WebSocket webSocket)
parseMessage
public void parseMessage(String d)
- Description copied from class:
WebSocketProcessor
- Parse the WebSocket message, and delegate the processing to the
AtmosphereServlet.cometSupport or
to any existing technology. Invoking AtmosphereServlet.cometSupport will delegate the request processing
to the AtmosphereHandler implementation. As an example, this is how Websocket messages are delegated to the
Jersey runtime.
- Specified by:
parseMessage in class WebSocketProcessor
- Parameters:
d - The Websocket message
parseMessage
public void parseMessage(byte[] d,
int offset,
int length)
- Description copied from class:
WebSocketProcessor
- Parse the WebSocket message, and delegate the processing to the
AtmosphereServlet.cometSupport or
to any existing technology. Invoking AtmosphereServlet.cometSupport will delegate the request processing
to the AtmosphereHandler implementation. As an example, this is how Websocket messages are delegated to the
Jersey runtime.
- Specified by:
parseMessage in class WebSocketProcessor
- Parameters:
d - The Websocket messageoffset - offset message indexlength - length of the message.
Copyright © 2011. All Rights Reserved.