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>
_logger| Constructor and Description |
|---|
AnnotationCometDServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
deprocessService(ServerAnnotationProcessor processor,
Object service) |
protected void |
deregisterService(Object service) |
void |
destroy() |
protected 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, serviceOptionsdoDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic void init()
throws javax.servlet.ServletException
init in class CometDServletjavax.servlet.ServletExceptionprotected ServerAnnotationProcessor newServerAnnotationProcessor(BayeuxServer bayeuxServer)
protected Object processService(ServerAnnotationProcessor processor, String serviceClassName) throws javax.servlet.ServletException
javax.servlet.ServletExceptionprotected void registerService(Object service)
public void destroy()
destroy in interface javax.servlet.Servletdestroy in class CometDServletprotected void deregisterService(Object service)
protected void deprocessService(ServerAnnotationProcessor processor, Object service)
Copyright © 2008–2017 The CometD Project. All rights reserved.