|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.websocket.WebSocketProcessor
public abstract class WebSocketProcessor
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.
| Constructor Summary | |
|---|---|
WebSocketProcessor(AtmosphereServlet atmosphereServlet,
WebSocket webSocket)
|
|
| Method Summary | |
|---|---|
void |
close()
|
protected Map<String,String> |
configureHeader(javax.servlet.http.HttpServletRequest request)
|
void |
dispatch(javax.servlet.http.HttpServletRequest request)
|
protected void |
dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Dispatch to request/response to the CometSupport implementation as it was a normal HTTP request. |
void |
notifyListener(WebSocketEventListener.WebSocketEvent event)
|
abstract void |
parseMessage(byte[] data,
int offset,
int length)
Parse the WebSocket message, and delegate the processing to the AtmosphereServlet.cometSupport or
to any existing technology. |
abstract void |
parseMessage(String data)
Parse the WebSocket message, and delegate the processing to the AtmosphereServlet.cometSupport or
to any existing technology. |
javax.servlet.http.HttpServletRequest |
request()
|
AtmosphereResource<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse> |
resource()
|
String |
toString()
|
WebSocket |
webSocketSupport()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WebSocketProcessor(AtmosphereServlet atmosphereServlet,
WebSocket webSocket)
| Method Detail |
|---|
public final void dispatch(javax.servlet.http.HttpServletRequest request)
throws IOException
IOException
protected final void dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
CometSupport implementation as it was a normal HTTP request.
request - a HttpServletRequestresponse - a HttpServletResponsepublic AtmosphereResource<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse> resource()
public javax.servlet.http.HttpServletRequest request()
public WebSocket webSocketSupport()
public abstract void parseMessage(String data)
AtmosphereServlet.cometSupport or
to any existing technology. Invoking AtmosphereServlet.cometSupport will delegate the request processing
to the AtmosphereHandler implementation. As an example, this is how Websocket messages are delegated to the
Jersey runtime.
data - The Websocket message
public abstract void parseMessage(byte[] data,
int offset,
int length)
AtmosphereServlet.cometSupport or
to any existing technology. Invoking AtmosphereServlet.cometSupport will delegate the request processing
to the AtmosphereHandler implementation. As an example, this is how Websocket messages are delegated to the
Jersey runtime.
data - The Websocket messageoffset - offset message indexlength - length of the message.public void close()
public String toString()
toString in class Objectpublic void notifyListener(WebSocketEventListener.WebSocketEvent event)
protected Map<String,String> configureHeader(javax.servlet.http.HttpServletRequest request)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||