|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.atmosphere.cpr.AtmosphereConfig
public class AtmosphereConfig
This class contains information about the current state of the AtmosphereFramework
. You can also
register a AtmosphereConfig.ShutdownHook
.
Nested Class Summary | |
---|---|
static interface |
AtmosphereConfig.ShutdownHook
A shutdown hook that will be called when the AtmosphereFramework.destroy() method gets invoked. |
static interface |
AtmosphereConfig.StartupHook
A Startup hook that will be called when the AtmosphereFramework.init() method complete. |
Field Summary | |
---|---|
protected static org.slf4j.Logger |
logger
|
protected List<AtmosphereConfig.ShutdownHook> |
shutdownHooks
|
protected List<AtmosphereConfig.StartupHook> |
startUpHook
|
Constructor Summary | |
---|---|
AtmosphereConfig(AtmosphereFramework framework)
|
Method Summary | |
---|---|
protected void |
destroy()
Invoke AtmosphereConfig.ShutdownHook s. |
AtmosphereFramework |
framework()
Return the AtmosphereFramework . |
List<AtmosphereHandlerConfig> |
getAtmosphereHandlerConfig()
|
BroadcasterFactory |
getBroadcasterFactory()
Return an instance of DefaultBroadcasterFactory . |
String |
getInitParameter(String name)
Return the value of the init params defined in web.xml or application.xml. |
boolean |
getInitParameter(String key,
boolean defaultValue)
|
int |
getInitParameter(String key,
int defaultValue)
Return an init-param, or its default value. |
String |
getInitParameter(String key,
String defaultValue)
Return an init-param, or its default value. |
Enumeration<String> |
getInitParameterNames()
Return all init param. |
javax.servlet.ServletConfig |
getServletConfig()
Return the ServletConfig . |
javax.servlet.ServletContext |
getServletContext()
Return the ServletContext . |
String |
getWebServerName()
Return the current WebServer used. |
Map<String,AtmosphereFramework.AtmosphereHandlerWrapper> |
handlers()
Return the list of AtmosphereFramework.AtmosphereHandlerWrapper s. |
protected void |
initComplete()
Invoke AtmosphereConfig.ShutdownHook s. |
boolean |
isSessionTimeoutRemovalAllowed()
Allow HTTP session timeout removal when session support is active |
boolean |
isSupportSession()
Is HttpSession supported. |
boolean |
isThrowExceptionOnCloned()
Is cloned request throws exception. |
MetaBroadcaster |
metaBroadcaster()
|
Map<String,Object> |
properties()
Return the Map of Applications's properties. |
AtmosphereResourceFactory |
resourcesFactory()
|
void |
setSessionTimeoutRemovalAllowed(boolean sessionTimeoutRemovalAllowed)
Enable/Disable HttpSession timeout removal when a connection exists. |
void |
setSupportSession(boolean supportSession)
Enable/Disable HttpSession . |
void |
setThrowExceptionOnCloned(boolean throwExceptionOnCloned)
Enable/Disable Exception on cloned request. |
AtmosphereConfig |
shutdownHook(AtmosphereConfig.ShutdownHook s)
Add a AtmosphereConfig.ShutdownHook . |
AtmosphereConfig |
startupHook(AtmosphereConfig.StartupHook s)
Add a AtmosphereConfig.StartupHook . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.slf4j.Logger logger
protected final List<AtmosphereConfig.ShutdownHook> shutdownHooks
protected final List<AtmosphereConfig.StartupHook> startUpHook
Constructor Detail |
---|
public AtmosphereConfig(AtmosphereFramework framework)
Method Detail |
---|
public List<AtmosphereHandlerConfig> getAtmosphereHandlerConfig()
public AtmosphereFramework framework()
AtmosphereFramework
.
AtmosphereFramework
public javax.servlet.ServletConfig getServletConfig()
ServletConfig
.
ServletConfig
public javax.servlet.ServletContext getServletContext()
ServletContext
.
ServletContext
public String getWebServerName()
public Map<String,AtmosphereFramework.AtmosphereHandlerWrapper> handlers()
AtmosphereFramework.AtmosphereHandlerWrapper
s.
AtmosphereFramework.AtmosphereHandlerWrapper
public String getInitParameter(String name)
name
- the name
public Enumeration<String> getInitParameterNames()
public boolean isSupportSession()
HttpSession
supported.
HttpSession
supported.public void setSupportSession(boolean supportSession)
HttpSession
.
supportSession
- true to enable, false to disablepublic boolean isSessionTimeoutRemovalAllowed()
public void setSessionTimeoutRemovalAllowed(boolean sessionTimeoutRemovalAllowed)
HttpSession
timeout removal when a connection exists.
sessionTimeoutRemovalAllowed
- true to enable, false to disablepublic boolean isThrowExceptionOnCloned()
public void setThrowExceptionOnCloned(boolean throwExceptionOnCloned)
throwExceptionOnCloned
- public BroadcasterFactory getBroadcasterFactory()
DefaultBroadcasterFactory
.
DefaultBroadcasterFactory
public Map<String,Object> properties()
Map
of Applications's properties.
Map
of Applications's propertiesprotected void destroy()
AtmosphereConfig.ShutdownHook
s.
protected void initComplete()
AtmosphereConfig.ShutdownHook
s.
public AtmosphereConfig shutdownHook(AtmosphereConfig.ShutdownHook s)
AtmosphereConfig.ShutdownHook
.
s
- a AtmosphereConfig.ShutdownHook
public AtmosphereConfig startupHook(AtmosphereConfig.StartupHook s)
AtmosphereConfig.StartupHook
.
s
- a AtmosphereConfig.StartupHook
public String getInitParameter(String key, String defaultValue)
key
- defaultValue
-
public int getInitParameter(String key, int defaultValue)
key
- defaultValue
-
public boolean getInitParameter(String key, boolean defaultValue)
public AtmosphereResourceFactory resourcesFactory()
public MetaBroadcaster metaBroadcaster()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |