|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.websocket.protocol.EchoProtocol
public class EchoProtocol
Simple WebSocketProcessor that invoke the Broadcaster.broadcast(T) API when a WebSocket message
is received.
NOTE: If WebSocket frame are used the bytes will be decoded into a String, which reduce performance.
| Constructor Summary | |
|---|---|
EchoProtocol()
|
|
| Method Summary | |
|---|---|
void |
configure(AtmosphereServlet.AtmosphereConfig config)
Allow an implementation to query the AtmosphereConfig of init-param, etc. |
javax.servlet.http.HttpServletRequest |
parseMessage(AtmosphereResource resource,
byte[] data,
int offset,
int length)
Parse the WebSocket message, and delegate the processing to the AtmosphereServlet.cometSupport or
to any existing technology. |
javax.servlet.http.HttpServletRequest |
parseMessage(AtmosphereResource resource,
String data)
Parse the WebSocket message, and delegate the processing to the AtmosphereServlet.cometSupport or
to any existing technology. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EchoProtocol()
| Method Detail |
|---|
public javax.servlet.http.HttpServletRequest parseMessage(AtmosphereResource resource,
String data)
WebSocketProtocolAtmosphereServlet.cometSupport or
to any existing technology. Invoking AtmosphereServlet.cometSupport 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;
parseMessage in interface WebSocketProtocolresource - The AtmosphereResource associated with the WebSocket Handshakedata - The Websocket message
public javax.servlet.http.HttpServletRequest parseMessage(AtmosphereResource resource,
byte[] data,
int offset,
int length)
WebSocketProtocolAtmosphereServlet.cometSupport or
to any existing technology. Invoking AtmosphereServlet.cometSupport 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;
parseMessage in interface WebSocketProtocolresource - The AtmosphereResource associated with the WebSocket Handshakedata - The Websocket messageoffset - offset message indexlength - length of the message.public void configure(AtmosphereServlet.AtmosphereConfig config)
WebSocketProtocol
configure in interface WebSocketProtocolconfig - AtmosphereServlet.AtmosphereConfig
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||