|
||||||||||
| 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.ShutdownHooks. |
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. |
String |
getInitParameter(String closedAtmosphereThinkTime,
String defaultValue)
|
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.AtmosphereHandlerWrappers. |
protected void |
initComplete()
Invoke AtmosphereConfig.ShutdownHooks. |
boolean |
isSessionTimeoutRemovalAllowed()
Allow HTTP session timeout removal when session support is active |
boolean |
isSupportSession()
Is HttpSession supported. |
boolean |
isThrowExceptionOnCloned()
Is cloned request throws exception. |
Map<String,Object> |
properties()
Return the Map of Applications's properties. |
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.
AtmosphereFrameworkpublic javax.servlet.ServletConfig getServletConfig()
ServletConfig.
ServletConfigpublic javax.servlet.ServletContext getServletContext()
ServletContext.
ServletContextpublic String getWebServerName()
public Map<String,AtmosphereFramework.AtmosphereHandlerWrapper> handlers()
AtmosphereFramework.AtmosphereHandlerWrappers.
AtmosphereFramework.AtmosphereHandlerWrapperpublic String getInitParameter(String name)
name - the name
public String getInitParameter(String closedAtmosphereThinkTime,
String defaultValue)
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.
DefaultBroadcasterFactorypublic Map<String,Object> properties()
Map of Applications's properties.
Map of Applications's propertiesprotected void destroy()
AtmosphereConfig.ShutdownHooks.
protected void initComplete()
AtmosphereConfig.ShutdownHooks.
public AtmosphereConfig shutdownHook(AtmosphereConfig.ShutdownHook s)
AtmosphereConfig.ShutdownHook.
s - a AtmosphereConfig.ShutdownHook
public AtmosphereConfig startupHook(AtmosphereConfig.StartupHook s)
AtmosphereConfig.StartupHook.
s - a AtmosphereConfig.StartupHook
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||