|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.websocket.protocol.SimpleHttpProtocol
public class SimpleHttpProtocol
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.
ApplicationConfig.WEBSOCKET_CONTENT_TYPE property
The method is defined using ApplicationConfig.WEBSOCKET_METHOD property
| Field Summary | |
|---|---|
protected String |
contentType
|
protected String |
delimiter
|
protected boolean |
destroyable
|
protected String |
methodType
|
protected boolean |
rewriteUri
|
| Constructor Summary | |
|---|---|
SimpleHttpProtocol()
|
|
| Method Summary | |
|---|---|
void |
configure(AtmosphereConfig config)
Allow an implementation to query the AtmosphereConfig of init-param, etc. |
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[] d,
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 message)
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String contentType
protected String methodType
protected String delimiter
protected boolean destroyable
protected boolean rewriteUri
| Constructor Detail |
|---|
public SimpleHttpProtocol()
| Method Detail |
|---|
public void configure(AtmosphereConfig config)
WebSocketProtocol
configure in interface WebSocketProtocolconfig - AtmosphereConfig
public List<AtmosphereRequest> onMessage(WebSocket webSocket,
String message)
WebSocketProtocolAtmosphereFramework.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;
onMessage in interface WebSocketProtocolwebSocket - The WebSocket connectionmessage - The Websocket message
AtmosphereRequest
public List<AtmosphereRequest> onMessage(WebSocket webSocket,
byte[] d,
int offset,
int length)
WebSocketProtocolAtmosphereFramework.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;
onMessage in interface WebSocketProtocolwebSocket - The WebSocket connectionoffset - offset message indexlength - length of the message.
AtmosphereRequestpublic void onOpen(WebSocket webSocket)
WebSocketProtocol
onOpen in interface WebSocketProtocolwebSocket - WebSocketpublic void onClose(WebSocket webSocket)
WebSocketProtocol
onClose in interface WebSocketProtocolwebSocket - WebSocket
public void onError(WebSocket webSocket,
WebSocketProcessor.WebSocketException t)
WebSocketProtocol
onError in interface WebSocketProtocolwebSocket - WebSockett - a WebSocketProcessor.WebSocketException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||