Class AtmosphereConfig


  • public class AtmosphereConfig
    extends java.lang.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
    • Method Detail

      • getServletConfig

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

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

        public java.lang.String getWebServerName()
        Return the current WebServer used.
        Returns:
        the current WebServer used
      • getInitParameter

        public java.lang.String getInitParameter​(java.lang.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 java.util.Enumeration<java.lang.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 -
      • properties

        public java.util.Map<java.lang.String,​java.lang.Object> properties()
        Return the Map of Applications's properties.
        Returns:
        the Map of Applications's properties
      • getInitParameter

        public java.lang.String getInitParameter​(java.lang.String key,
                                                 java.lang.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​(java.lang.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​(java.lang.String key,
                                    int defaultValue)
        Return an init-param, or its default value.
        Parameters:
        key -
        defaultValue -
        Returns:
        an init-param, or its default value.