Class CometDServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.cometd.server.CometDServlet
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
- Direct Known Subclasses:
AnnotationCometDServlet
public class CometDServlet
extends javax.servlet.http.HttpServlet
The CometD Servlet maps HTTP requests to the AbstractHttpTransport
of a BayeuxServer instance.
The BayeuxServer instance is searched in the servlet context under the BayeuxServer.ATTRIBUTE
attribute; if it is found then it is used without further configuration, otherwise a new BayeuxServer
instance is created and configured using the init parameters of this servlet.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voidinit()protected BayeuxServerImplprotected voidservice(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected voidserviceOptions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, serviceMethods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
CometDServlet
public CometDServlet()
-
-
Method Details
-
init
public void init() throws javax.servlet.ServletException- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
getBayeux
-
newBayeuxServer
-
service
protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
servicein classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
serviceOptions
protected void serviceOptions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) -
destroy
public void destroy()- Specified by:
destroyin interfacejavax.servlet.Servlet- Overrides:
destroyin classjavax.servlet.GenericServlet
-