public class WebSocketChatServlet extends WebSocketServlet
Constructor and Description |
---|
WebSocketChatServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
WebSocket |
doWebSocketConnect(javax.servlet.http.HttpServletRequest request,
String protocol)
Factory method that applications needs to implement to return a
WebSocket object. |
checkOrigin, destroy, init, service
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
public WebSocket doWebSocketConnect(javax.servlet.http.HttpServletRequest request, String protocol)
WebSocketFactory.Acceptor
Factory method that applications needs to implement to return a
WebSocket
object.
request
- the incoming HTTP upgrade requestprotocol
- the websocket sub protocolWebSocket
object that will handle websocket events.Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.