com.sun.grizzly.cometd.standalone
Class CometdAdapter
java.lang.Object
com.sun.grizzly.tcp.StaticResourcesAdapter
com.sun.grizzly.cometd.standalone.CometdAdapter
- All Implemented Interfaces:
- Adapter
public class CometdAdapter
- extends StaticResourcesAdapter
- implements Adapter
Standalone Cometd implementation. This class is used when Cometd is enabled
from the Grizzly standalone WebServer. To enable it, just add:
-Dcom.sun.grizzly.adapterClass=com.sun.grizzly.cometd.standalone.CometdAdapter
- Author:
- Jeanfrancois Arcand
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ADAPTER_NOTES
public static final int ADAPTER_NOTES
- See Also:
- Constant Field Values
CometdAdapter
public CometdAdapter()
service
public void service(Request req,
Response res)
throws Exception
- Route the request to the cometd implementation. If the request point to
a static file, delegate the call to the Grizzly WebServer implementation.
- Specified by:
service
in interface Adapter
- Overrides:
service
in class StaticResourcesAdapter
- Throws:
Exception
- if an error happens during handling of
the request. Common errors are:
- IOException if an input/output error occurs and we are
processing an included servlet (otherwise it is swallowed and
handled by the top level error handler mechanism)
- ServletException if a servlet throws an exception and
we are processing an included servlet (otherwise it is swallowed
and handled by the top level error handler mechanism)
Tomcat should be able to handle and log any other exception ( including
runtime exceptions )
getContextPath
public String getContextPath()
- Return the comet context path used by this Adapter. By default, it return
"/cometd"
setContextPath
public void setContextPath(String contextPath)
- Set the comet context path.
Copyright © 2008 SUN Microsystems. All Rights Reserved.