public class AnnotationCometDServlet extends CometDServlet
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 xmlns="http://java.sun.com/xml/ns/javaee" ...> <servlet> <servlet-name>cometd</servlet-name> <servlet-class>org.cometd.annotation.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>
Constructor and Description |
---|
AnnotationCometDServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
deprocessService(ServerAnnotationProcessor processor,
Object service) |
protected void |
deregisterService(Object service) |
void |
destroy() |
List<Object> |
getServices() |
void |
init() |
protected ServerAnnotationProcessor |
newServerAnnotationProcessor(BayeuxServer bayeuxServer) |
protected Object |
newService(String serviceClassName) |
protected Object |
processService(ServerAnnotationProcessor processor,
String serviceClassName) |
protected void |
registerService(Object service) |
getBayeux, newBayeuxServer, service, serviceOptions
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
public void init() throws javax.servlet.ServletException
init
in class CometDServlet
javax.servlet.ServletException
protected ServerAnnotationProcessor newServerAnnotationProcessor(BayeuxServer bayeuxServer)
protected Object processService(ServerAnnotationProcessor processor, String serviceClassName) throws javax.servlet.ServletException
javax.servlet.ServletException
protected void registerService(Object service)
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class CometDServlet
protected void deregisterService(Object service)
protected void deprocessService(ServerAnnotationProcessor processor, Object service)
Copyright © 2008–2024 The CometD Project. All rights reserved.