com.sun.grizzly.cometd.standalone
Class CometdAdapter

java.lang.Object
  extended by com.sun.grizzly.tcp.StaticResourcesAdapter
      extended by com.sun.grizzly.tcp.http11.GrizzlyAdapter
          extended by com.sun.grizzly.cometd.standalone.CometdAdapter
All Implemented Interfaces:
Adapter

public class CometdAdapter
extends GrizzlyAdapter

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

Field Summary
static String COMETD_REQUEST
           
static String COMETD_RESPONSE
           
 
Fields inherited from class com.sun.grizzly.tcp.http11.GrizzlyAdapter
ADAPTER_NOTES, ALLOW_BACKSLASH, chunkingDisabled
 
Fields inherited from class com.sun.grizzly.tcp.StaticResourcesAdapter
cache, commitErrorResponse, fileFolders, logger, resourcesContextPath
 
Constructor Summary
CometdAdapter()
           
 
Method Summary
 String getContextPath()
          Return the comet context path used by this Adapter.
 void service(GrizzlyRequest request, GrizzlyResponse response)
          Route the request to the cometd implementation.
 void setContextPath(String contextPath)
          Set the comet context path.
 
Methods inherited from class com.sun.grizzly.tcp.http11.GrizzlyAdapter
afterService, afterService, destroy, isAllowEncodedSlash, isHandleStaticResources, service, setAllowEncodedSlash, setDecodeUrl, setHandleStaticResources, start
 
Methods inherited from class com.sun.grizzly.tcp.StaticResourcesAdapter
addRootFolder, customizedErrorPage, getDefaultContentType, getResourcesContextPath, getRootFolder, getRootFolders, initWebDir, isUseSendFile, service, setDefaultContentType, setLogger, setResourcesContextPath, setRootFolder, setUseSendFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMETD_REQUEST

public static final String COMETD_REQUEST
See Also:
Constant Field Values

COMETD_RESPONSE

public static final String COMETD_RESPONSE
See Also:
Constant Field Values
Constructor Detail

CometdAdapter

public CometdAdapter()
Method Detail

service

public void service(GrizzlyRequest request,
                    GrizzlyResponse response)
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 class GrizzlyAdapter

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 © 2009 SUN Microsystems. All Rights Reserved.