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) |
java.lang.Object |
createWebSocket(ServletUpgradeRequest req,
ServletUpgradeResponse resp)
Create a websocket from the incoming request.
|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
destroy, init, servicedoDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, serviceprotected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionpublic java.lang.Object createWebSocket(ServletUpgradeRequest req, ServletUpgradeResponse resp)
WebSocketCreatorcreateWebSocket in interface WebSocketCreatorreq - the request detailsresp - the response detailspublic void configure(WebSocketServletFactory factory)
configure in class WebSocketServletCopyright © 1995–2018 Webtide. All rights reserved.