org.cometd.java.annotation
Class AnnotationCometdServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.cometd.server.CometdServlet
org.cometd.java.annotation.AnnotationCometdServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
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.java.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>
- See Also:
- Serialized Form
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
| Methods inherited from class javax.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 |
AnnotationCometdServlet
public AnnotationCometdServlet()
init
public void init()
throws javax.servlet.ServletException
- Overrides:
init in class CometdServlet
- Throws:
javax.servlet.ServletException
newServerAnnotationProcessor
protected ServerAnnotationProcessor newServerAnnotationProcessor(BayeuxServer bayeuxServer)
processService
protected Object processService(ServerAnnotationProcessor processor,
String serviceClassName)
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
newService
protected Object newService(String serviceClassName)
throws Exception
- Throws:
Exception
destroy
public void destroy()
- Specified by:
destroy in interface javax.servlet.Servlet- Overrides:
destroy in class CometdServlet
deprocessService
protected void deprocessService(ServerAnnotationProcessor processor,
Object service)
getServices
protected List<Object> getServices()
Copyright © 2008-2011 Dojo Foundation. All Rights Reserved.