Class AnnotationCometDServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.cometd.server.http.jakarta.CometDServlet
org.cometd.annotation.server.jakarta.AnnotationCometDServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
A specialized version of CometDServlet
that can be configured with the init-parameter
services to be a comma separated list of class names of annotated services, that will
be processed by ServerAnnotationProcessor
upon initialization.
A configuration example:
<web-app ...>
<servlet>
<servlet-name>cometd</servlet-name>
<servlet-class>org.cometd.annotation.server.jakarta.AnnotationCometDServlet</servlet-class>
<init-param>
<param-name>services</param-name>
<param-value>org.cometd.examples.FooService, org.cometd.examples.BarService</param-value>
</init-param>
</servlet>
</web-app>
- See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
deprocessService
(ServerAnnotationProcessor processor, Object service) protected void
deregisterService
(Object service) void
destroy()
void
init()
protected ServerAnnotationProcessor
newServerAnnotationProcessor
(BayeuxServer bayeuxServer) protected Object
newService
(String serviceClassName) protected Object
processService
(ServerAnnotationProcessor processor, String serviceClassName) protected void
registerService
(Object service) Methods inherited from class org.cometd.server.http.jakarta.CometDServlet
getBayeuxServer, newBayeuxServer, sendError, service, serviceOptions
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service
Methods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Constructor Details
-
AnnotationCometDServlet
public AnnotationCometDServlet()
-
-
Method Details
-
init
public void init() throws jakarta.servlet.ServletException- Overrides:
init
in classCometDServlet
- Throws:
jakarta.servlet.ServletException
-
newServerAnnotationProcessor
-
processService
protected Object processService(ServerAnnotationProcessor processor, String serviceClassName) throws jakarta.servlet.ServletException - Throws:
jakarta.servlet.ServletException
-
newService
-
registerService
-
destroy
public void destroy()- Specified by:
destroy
in interfacejakarta.servlet.Servlet
- Overrides:
destroy
in classCometDServlet
-
deregisterService
-
deprocessService
-
getServices
-