org.atmosphere.grizzly
Class AtmosphereAdapter

java.lang.Object
  extended by com.sun.grizzly.tcp.StaticResourcesAdapter
      extended by com.sun.grizzly.tcp.http11.GrizzlyAdapter
          extended by com.sun.grizzly.http.servlet.ServletAdapter
              extended by org.atmosphere.grizzly.AtmosphereAdapter
All Implemented Interfaces:
com.sun.grizzly.tcp.Adapter

public class AtmosphereAdapter
extends com.sun.grizzly.http.servlet.ServletAdapter

Simple GrizzlyAdapter that can be used to embed Atmosphere using Grizzly.

Author:
Jeanfrancois Arcand

Field Summary
 
Fields inherited from class com.sun.grizzly.http.servlet.ServletAdapter
classLoader, INCREMENT, initialize, LOAD_ON_STARTUP, properties, REQUEST_RESPONSE_NOTES, SERVLETCONFIG_NOTES, servletInstance
 
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
AtmosphereAdapter()
           
 
Method Summary
 void addAtmosphereHandler(String path, AtmosphereHandler ah)
          Add an AtmosphereHandler
 String getResourcePackage()
          Set the location of web application.
 void setResourcePackage(String resourcePackage)
          Return the location of web application.
 void setUseStreamForFlushingComments(boolean useStreaming)
          Use OutputStream when flusing bytes.
 void start()
           
 
Methods inherited from class com.sun.grizzly.http.servlet.ServletAdapter
addContextParameter, addFilter, addFilter, addInitParameter, addServletListener, afterService, configureClassLoader, configureServletEnv, containsInitParameter, customizeErrorPage, destroy, doService, getClassLoader, getContextParameters, getContextPath, getInitParameter, getListeners, getProperty, getServletCtx, getServletInstance, getServletPath, isLoadOnStartup, loadServlet, newServletAdapter, removeInitParameter, removeProperty, removeServletListener, service, setClassLoader, setContextPath, setProperty, setServletInstance, setServletPath
 
Methods inherited from class com.sun.grizzly.tcp.http11.GrizzlyAdapter
afterService, isAllowEncodedSlash, isDecodeURL, isHandleStaticResources, service, setAllowEncodedSlash, setDecodeUrl, setHandleStaticResources
 
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
 

Constructor Detail

AtmosphereAdapter

public AtmosphereAdapter()
Method Detail

start

public void start()
Overrides:
start in class com.sun.grizzly.http.servlet.ServletAdapter

setUseStreamForFlushingComments

public void setUseStreamForFlushingComments(boolean useStreaming)
Use OutputStream when flusing bytes. Default is true when the runtime module is used, and false when jersey.

Parameters:
useStreaming - If OutputStream sould be used.

addAtmosphereHandler

public void addAtmosphereHandler(String path,
                                 AtmosphereHandler ah)
Add an AtmosphereHandler

Parameters:
path - Path to be added to.
ah - Handler for path.

getResourcePackage

public String getResourcePackage()
Set the location of web application. This maps to Jersey's "com.sun.jersey.config.property.packages" property.

Returns:
the resourcePackage

setResourcePackage

public void setResourcePackage(String resourcePackage)
Return the location of web application.

Parameters:
resourcePackage - the resourcePackage to set


Copyright © 2010. All Rights Reserved.