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(AtmosphereFramework framework,
WebSocket webSocket,
WebSocketProtocol webSocketProtocol)
dispatch
public final void dispatch(AtmosphereRequest 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(AtmosphereRequest request,
AtmosphereResponse r)
- Dispatch to request/response to the
AsyncSupport implementation as it was a normal HTTP request.
- Parameters:
request - a AtmosphereRequestr - a AtmosphereResponse
webSocket
public WebSocket webSocket()
close
public void close(int closeCode)
toString
public String toString()
- Overrides:
toString in class Object
notifyListener
public void notifyListener(WebSocketEventListener.WebSocketEvent event)
configureHeader
public static final Map<String,String> configureHeader(AtmosphereRequest request)
Copyright © 2012. All Rights Reserved.