public class WebSocketChatServlet extends WebSocketServlet implements WebSocketCreator
Modifier and Type | Class and Description |
---|---|
class |
WebSocketChatServlet.ChatWebSocket
Create a WebSocket that echo's back the message to all other members of the servlet.
|
Constructor and Description |
---|
WebSocketChatServlet() |
Modifier and Type | Method and Description |
---|---|
void |
configure(WebSocketServletFactory factory) |
Object |
createWebSocket(ServletUpgradeRequest req,
ServletUpgradeResponse resp)
Create a websocket from the incoming request.
|
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response) |
destroy, init, service
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doGet
in class HttpServlet
ServletException
IOException
public Object createWebSocket(ServletUpgradeRequest req, ServletUpgradeResponse resp)
WebSocketCreator
createWebSocket
in interface WebSocketCreator
req
- the request detailsresp
- the response detailspublic void configure(WebSocketServletFactory factory)
configure
in class WebSocketServlet
Copyright © 1995-2015 Webtide. All Rights Reserved.