Package org.cometd.server
Class CometDServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.cometd.server.CometDServlet
-
- All Implemented Interfaces:
java.io.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 aBayeuxServer
instance.The
BayeuxServer
instance is searched in the servlet context under theBayeuxServer.ATTRIBUTE
attribute; if it is found then it is used without further configuration, otherwise a newBayeuxServer
instance is created and configured using the init parameters of this servlet.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CometDServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
BayeuxServerImpl
getBayeux()
void
init()
protected BayeuxServerImpl
newBayeuxServer()
protected void
service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
serviceOptions(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, service
-
-
-
-
Method Detail
-
init
public void init() throws javax.servlet.ServletException
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
getBayeux
public BayeuxServerImpl getBayeux()
-
newBayeuxServer
protected BayeuxServerImpl newBayeuxServer()
-
service
protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
- Overrides:
service
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
-
serviceOptions
protected void serviceOptions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejavax.servlet.Servlet
- Overrides:
destroy
in classjavax.servlet.GenericServlet
-
-