Package org.cometd.server
Class CometDServlet
- java.lang.Object
-
- jakarta.servlet.GenericServlet
-
- jakarta.servlet.http.HttpServlet
-
- org.cometd.server.CometDServlet
-
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,java.io.Serializable
- Direct Known Subclasses:
AnnotationCometDServlet
public class CometDServlet extends jakarta.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(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
protected void
serviceOptions(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
-
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
-
-
-
-
Method Detail
-
init
public void init() throws jakarta.servlet.ServletException
- Overrides:
init
in classjakarta.servlet.GenericServlet
- Throws:
jakarta.servlet.ServletException
-
getBayeux
public BayeuxServerImpl getBayeux()
-
newBayeuxServer
protected BayeuxServerImpl newBayeuxServer()
-
service
protected void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, java.io.IOException
- Overrides:
service
in classjakarta.servlet.http.HttpServlet
- Throws:
jakarta.servlet.ServletException
java.io.IOException
-
serviceOptions
protected void serviceOptions(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejakarta.servlet.Servlet
- Overrides:
destroy
in classjakarta.servlet.GenericServlet
-
-