public class AnnotationCometDServlet
extends org.cometd.server.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 | Description |
---|---|
AnnotationCometDServlet() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
deprocessService(ServerAnnotationProcessor processor,
java.lang.Object service) |
|
protected void |
deregisterService(java.lang.Object service) |
|
void |
destroy() |
|
protected java.util.List<java.lang.Object> |
getServices() |
|
void |
init() |
|
protected ServerAnnotationProcessor |
newServerAnnotationProcessor(org.cometd.bayeux.server.BayeuxServer bayeuxServer) |
|
protected java.lang.Object |
newService(java.lang.String serviceClassName) |
|
protected java.lang.Object |
processService(ServerAnnotationProcessor processor,
java.lang.String serviceClassName) |
|
protected void |
registerService(java.lang.Object service) |
getBayeux, newBayeuxServer, service, serviceOptions
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
public void init() throws javax.servlet.ServletException
init
in class org.cometd.server.CometDServlet
javax.servlet.ServletException
protected ServerAnnotationProcessor newServerAnnotationProcessor(org.cometd.bayeux.server.BayeuxServer bayeuxServer)
protected java.lang.Object processService(ServerAnnotationProcessor processor, java.lang.String serviceClassName) throws javax.servlet.ServletException
javax.servlet.ServletException
protected java.lang.Object newService(java.lang.String serviceClassName) throws java.lang.Exception
java.lang.Exception
protected void registerService(java.lang.Object service)
public void destroy()
destroy
in class org.cometd.server.CometDServlet
protected void deregisterService(java.lang.Object service)
protected void deprocessService(ServerAnnotationProcessor processor, java.lang.Object service)
protected java.util.List<java.lang.Object> getServices()
Copyright © 2008–2017 The CometD Project. All rights reserved.