Class 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 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:
    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
      • Methods inherited from class jakarta.servlet.GenericServlet

        getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CometDServlet

        public CometDServlet()
    • Method Detail

      • init

        public void init()
                  throws jakarta.servlet.ServletException
        Overrides:
        init in class jakarta.servlet.GenericServlet
        Throws:
        jakarta.servlet.ServletException
      • service

        protected void service​(jakarta.servlet.http.HttpServletRequest request,
                               jakarta.servlet.http.HttpServletResponse response)
                        throws jakarta.servlet.ServletException,
                               java.io.IOException
        Overrides:
        service in class jakarta.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 interface jakarta.servlet.Servlet
        Overrides:
        destroy in class jakarta.servlet.GenericServlet