public abstract class WebSocketServlet extends javax.servlet.http.HttpServlet implements WebSocketFactory.Acceptor
Constructor and Description |
---|
WebSocketServlet() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkOrigin(javax.servlet.http.HttpServletRequest request,
String origin)
Checks the origin of an incoming WebSocket handshake request.
|
void |
destroy() |
void |
init() |
protected void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.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 javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
GenericServlet.init()
protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public boolean checkOrigin(javax.servlet.http.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 javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.