public abstract class WebSocketServlet extends HttpServlet implements WebSocketFactory.Acceptor
Constructor and Description |
---|
WebSocketServlet() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkOrigin(HttpServletRequest request,
String origin)
Checks the origin of an incoming WebSocket handshake request.
|
void |
destroy() |
void |
init() |
protected void |
service(HttpServletRequest request,
HttpServletResponse response) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doWebSocketConnect
public void init() throws ServletException
init
in class GenericServlet
ServletException
GenericServlet.init()
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
service
in class HttpServlet
ServletException
IOException
HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public boolean checkOrigin(HttpServletRequest request, String origin)
WebSocketFactory.Acceptor
Checks the origin of an incoming WebSocket handshake request.
checkOrigin
in interface WebSocketFactory.Acceptor
request
- the incoming HTTP upgrade requestorigin
- the origin URIpublic void destroy()
destroy
in interface Servlet
destroy
in class GenericServlet
Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.