Class AtmosphereConfig

java.lang.Object
org.atmosphere.cpr.AtmosphereConfig

public class AtmosphereConfig extends Object
This class contains information about the current state of the AtmosphereFramework. You can also register a AtmosphereConfig.ShutdownHook.
Author:
Sebastien Dionne : sebastien.dionne@gmail.com, Jeanfrancois Arcand
  • Field Details

  • Constructor Details

  • Method Details

    • getAtmosphereHandlerConfig

      public List<AtmosphereHandlerConfig> getAtmosphereHandlerConfig()
    • framework

      public AtmosphereFramework framework()
      Returns:
      the AtmosphereFramework
    • getServletConfig

      public jakarta.servlet.ServletConfig getServletConfig()
      Return the ServletConfig.
      Returns:
      ServletConfig
    • getServletContext

      public jakarta.servlet.ServletContext getServletContext()
      Return the ServletContext.
      Returns:
      ServletContext
    • getWebServerName

      public String getWebServerName()
      Return the current WebServer used.
      Returns:
      the current WebServer used
    • handlers

      public Map<String,AtmosphereHandlerWrapper> handlers()
      Return the list of AtmosphereHandlerWrappers.
      Returns:
      the list of AtmosphereHandlerWrapper
    • getInitParameter

      public String getInitParameter(String name)
      Return the value of the init params defined in web.xml or application.xml.
      Parameters:
      name - the name
      Returns:
      the value for the init parameter if defined
    • getInitParameterNames

      public Enumeration<String> getInitParameterNames()
      Return all init param.
      Returns:
      the list of init params defined in web.xml or application.xml for the servlet
    • isSupportSession

      public boolean isSupportSession()
      Is HttpSession supported.
      Returns:
      HttpSession supported.
    • setSupportSession

      public void setSupportSession(boolean supportSession)
      Enable/Disable HttpSession.
      Parameters:
      supportSession - true to enable, false to disable
    • isSessionTimeoutRemovalAllowed

      public boolean isSessionTimeoutRemovalAllowed()
      Allow HTTP session timeout removal when session support is active
      Returns:
      HTTP session timeout removal allowed.
    • setSessionTimeoutRemovalAllowed

      public void setSessionTimeoutRemovalAllowed(boolean sessionTimeoutRemovalAllowed)
      Enable/Disable HttpSession timeout removal when a connection exists.
      Parameters:
      sessionTimeoutRemovalAllowed - true to enable, false to disable
    • isThrowExceptionOnCloned

      public boolean isThrowExceptionOnCloned()
      Is cloned request throws exception.
      Returns:
      Cloned Request's exception supported.
    • setThrowExceptionOnCloned

      public void setThrowExceptionOnCloned(boolean throwExceptionOnCloned)
      Enable/Disable Exception on cloned request.
      Parameters:
      throwExceptionOnCloned -
    • getBroadcasterFactory

      public BroadcasterFactory getBroadcasterFactory()
      Return an instance of DefaultBroadcasterFactory.
      Returns:
      an instance of DefaultBroadcasterFactory
    • properties

      public Map<String,Object> properties()
      Return the Map of Applications's properties.
      Returns:
      the Map of Applications's properties
    • destroy

      protected void destroy()
    • initComplete

      protected void initComplete()
    • shutdownHook

      Add a AtmosphereConfig.ShutdownHook. Safe to call from any thread, including while the framework's destroy runs its hooks; a hook added then may not run, so a caller that can register late checks AtmosphereFramework.isDestroyed() after registering and releases what the hook would have.
      Parameters:
      s - a AtmosphereConfig.ShutdownHook
      Returns:
      this
    • startupHook

      Add a AtmosphereConfig.StartupHook. If the AtmosphereFramework.isInit return true, the StartupHook will be executed immediately.
      Parameters:
      s - a AtmosphereConfig.StartupHook
      Returns:
      this
    • getInitParameter

      public String getInitParameter(String key, String defaultValue)
      Return an init-param, or its default value.
      Parameters:
      key -
      defaultValue -
      Returns:
      an init-param, or its default value.
    • getInitParameter

      public boolean getInitParameter(String key, boolean defaultValue)
      Return an init-param, or its default value.
      Parameters:
      key -
      defaultValue -
      Returns:
      an init-param, or its default value.
    • getInitParameter

      public int getInitParameter(String key, int defaultValue)
      Return an init-param, or its default value.
      Parameters:
      key -
      defaultValue -
      Returns:
      an init-param, or its default value.
    • resourcesFactory

      public AtmosphereResourceFactory resourcesFactory()
      Returns:
      the AtmosphereResourceFactory
    • metaBroadcaster

      public MetaBroadcaster metaBroadcaster()
      Returns:
      the MetaBroadcaster
    • sessionFactory

      public AtmosphereResourceSessionFactory sessionFactory()
      Returns:
      the AtmosphereResourceSessionFactory
    • uuidProvider

      public UUIDProvider uuidProvider()
      Return the UUIDProvider
      Returns:
      UUIDProvider
    • websocketFactory

      public WebSocketFactory websocketFactory()
      Return the WebSocketFactory
      Returns:
      the WebSocketFactory
    • populate

      public AtmosphereConfig populate(AtmosphereConfig config)