|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.websocket.DefaultWebSocketProcessor
public class DefaultWebSocketProcessor
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.atmosphere.websocket.WebSocketProcessor |
|---|
WebSocketProcessor.WebSocketException |
| Constructor Summary | |
|---|---|
DefaultWebSocketProcessor(AtmosphereFramework framework,
WebSocket webSocket,
WebSocketProtocol webSocketProtocol)
|
|
| Method Summary | |
|---|---|
void |
close(int closeCode)
Invked when the WebServer is closing the native WebSocket |
static Map<String,String> |
configureHeader(AtmosphereRequest request)
|
void |
dispatch(AtmosphereRequest request,
AtmosphereResponse r)
Dispatch to request/response to the AsyncSupport implementation as it was a normal HTTP request. |
void |
invokeWebSocketProtocol(byte[] data,
int offset,
int length)
Invoked when a WebSocket message gets received from the underlying container |
void |
invokeWebSocketProtocol(String webSocketMessage)
Invoked when a WebSocket message gets received from the underlying container |
void |
notifyListener(WebSocketEventListener.WebSocketEvent event)
Notify all WebSocketEventListener |
void |
open(AtmosphereRequest request)
Invoked when a WebSocket gets opened by the underlying container |
String |
toString()
|
WebSocket |
webSocket()
Return the underlying WebSocket. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultWebSocketProcessor(AtmosphereFramework framework,
WebSocket webSocket,
WebSocketProtocol webSocketProtocol)
| Method Detail |
|---|
public final void open(AtmosphereRequest request)
throws IOException
open in interface WebSocketProcessorIOExceptionpublic void invokeWebSocketProtocol(String webSocketMessage)
invokeWebSocketProtocol in interface WebSocketProcessor
public void invokeWebSocketProtocol(byte[] data,
int offset,
int length)
invokeWebSocketProtocol in interface WebSocketProcessor
public final void dispatch(AtmosphereRequest request,
AtmosphereResponse r)
AsyncSupport implementation as it was a normal HTTP request.
request - a AtmosphereRequestr - a AtmosphereResponsepublic WebSocket webSocket()
webSocket in interface WebSocketProcessorpublic void close(int closeCode)
close in interface WebSocketProcessorpublic String toString()
toString in class Objectpublic void notifyListener(WebSocketEventListener.WebSocketEvent event)
WebSocketEventListener
notifyListener in interface WebSocketProcessorpublic static final Map<String,String> configureHeader(AtmosphereRequest request)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||