public interface WebSocketProcessor
DefaultWebSocketProcessor.
This class is targeted at framework developer as it requires Atmosphere's internal knowledge.
| Modifier and Type | Interface and Description |
|---|---|
static class |
WebSocketProcessor.WebSocketException
An exception that can be used to flag problems with the WebSocket processing.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close(WebSocket webSocket,
int closeCode)
Invked when the WebServer is closing the native WebSocket
|
void |
destroy()
Destroy all resources associated with this class.
|
void |
invokeWebSocketProtocol(WebSocket webSocket,
byte[] data,
int offset,
int length)
Invoked when a WebSocket message gets received from the underlying container
|
void |
invokeWebSocketProtocol(WebSocket webSocket,
java.lang.String webSocketMessage)
Invoked when a WebSocket message gets received from the underlying container
|
void |
notifyListener(WebSocket webSocket,
WebSocketEventListener.WebSocketEvent webSocketEvent)
Notify all
WebSocketEventListener |
void |
open(WebSocket webSocket,
AtmosphereRequest request)
Invoked when a WebSocket gets opened by the underlying container
|
WebSocketProcessor |
registerWebSocketHandler(java.lang.String path,
WebSocketHandler webSockethandler)
Register a
WebSocketHandler |
WebSocketProcessor registerWebSocketHandler(java.lang.String path, WebSocketHandler webSockethandler)
WebSocketHandlerpath - the URI mapping the WebSocketHandlerwebSockethandler - an instance of WebSocketHandlervoid open(WebSocket webSocket, AtmosphereRequest request) throws java.io.IOException
request - java.io.IOExceptionvoid invokeWebSocketProtocol(WebSocket webSocket, java.lang.String webSocketMessage)
webSocketMessage - void invokeWebSocketProtocol(WebSocket webSocket, byte[] data, int offset, int length)
data - void close(WebSocket webSocket, int closeCode)
closeCode - void notifyListener(WebSocket webSocket, WebSocketEventListener.WebSocketEvent webSocketEvent)
WebSocketEventListenerwebSocketEvent - void destroy()
Copyright © 2018. All Rights Reserved.