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, servicegetInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, logclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoWebSocketConnectpublic void init()
throws ServletException
init in class GenericServletServletExceptionGenericServlet.init()protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
service in class HttpServletServletExceptionIOExceptionHttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)public boolean checkOrigin(HttpServletRequest request, String origin)
WebSocketFactory.AcceptorChecks the origin of an incoming WebSocket handshake request.
checkOrigin in interface WebSocketFactory.Acceptorrequest - the incoming HTTP upgrade requestorigin - the origin URIpublic void destroy()
destroy in interface Servletdestroy in class GenericServletCopyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.