public interface WebSocketProtocol extends AtmosphereConfigAware
Modifier and Type | Method and Description |
---|---|
void |
onClose(WebSocket webSocket)
Invoked when a WebSocket is closed
|
void |
onError(WebSocket webSocket,
WebSocketProcessor.WebSocketException t)
Invoked when an error occurs.
|
List<AtmosphereRequest> |
onMessage(WebSocket webSocket,
byte[] data,
int offset,
int length)
Parse the WebSocket message, and delegate the processing to the
AtmosphereFramework.asyncSupport or
to any existing technology. |
List<AtmosphereRequest> |
onMessage(WebSocket webSocket,
String data)
Parse the WebSocket message, and delegate the processing to the
AtmosphereFramework.asyncSupport or
to any existing technology. |
void |
onOpen(WebSocket webSocket)
Invoked when a WebSocket is opened
|
configure
List<AtmosphereRequest> onMessage(WebSocket webSocket, String data)
AtmosphereFramework.asyncSupport
or
to any existing technology. Invoking AtmosphereFramework.asyncSupport
will delegate the request processing
to the AtmosphereHandler
implementation. Returning null means this implementation will
handle itself the processing/dispatching of the WebSocket's request;
webSocket
- The WebSocket
connectiondata
- The Websocket messageAtmosphereRequest
List<AtmosphereRequest> onMessage(WebSocket webSocket, byte[] data, int offset, int length)
AtmosphereFramework.asyncSupport
or
to any existing technology. Invoking AtmosphereFramework.asyncSupport
will delegate the request processing
to the AtmosphereHandler
implementation. Returning null means this implementation will
handle itself the processing/dispatching of the WebSocket's request;
webSocket
- The WebSocket
connectionoffset
- offset message indexlength
- length of the message.AtmosphereRequest
void onOpen(WebSocket webSocket)
webSocket
- WebSocket
void onClose(WebSocket webSocket)
webSocket
- WebSocket
void onError(WebSocket webSocket, WebSocketProcessor.WebSocketException t)
webSocket
- WebSocket
t
- a WebSocketProcessor.WebSocketException
Copyright © 2016. All rights reserved.