public class AtmosphereConfig extends Object
AtmosphereFramework. You can also
register a AtmosphereConfig.ShutdownHook.| Modifier and Type | Class and Description |
|---|---|
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. |
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
protected List<AtmosphereConfig.ShutdownHook> |
shutdownHooks |
protected List<AtmosphereConfig.StartupHook> |
startUpHook |
| Modifier | Constructor and Description |
|---|---|
protected |
AtmosphereConfig(AtmosphereFramework framework) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
boolean |
getInitParameter(String key,
boolean defaultValue)
Return an init-param, or its default value.
|
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.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.
|
MetaBroadcaster |
metaBroadcaster()
Return the
DefaultMetaBroadcaster |
AtmosphereConfig |
populate(AtmosphereConfig config) |
Map<String,Object> |
properties()
Return the
Map of Applications's properties. |
AtmosphereResourceFactory |
resourcesFactory()
Return the
AtmosphereResourceFactory |
AtmosphereResourceSessionFactory |
sessionFactory()
Return the
AtmosphereResourceSessionFactory |
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)
|
AtmosphereConfig |
startupHook(AtmosphereConfig.StartupHook s)
Add a
AtmosphereConfig.StartupHook. |
UUIDProvider |
uuidProvider()
Return the
UUIDProvider |
WebSocketFactory |
websocketFactory()
Return the
WebSocketFactory |
protected static final org.slf4j.Logger logger
protected List<AtmosphereConfig.ShutdownHook> shutdownHooks
protected List<AtmosphereConfig.StartupHook> startUpHook
protected AtmosphereConfig(AtmosphereFramework framework)
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 namepublic 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)
s - a AtmosphereConfig.ShutdownHookpublic AtmosphereConfig startupHook(AtmosphereConfig.StartupHook s)
AtmosphereConfig.StartupHook. If the AtmosphereFramework.isInit return true, the
StartupHook will be executed immediately.s - a AtmosphereConfig.StartupHookpublic String getInitParameter(String key, String defaultValue)
key - defaultValue - public boolean getInitParameter(String key, boolean defaultValue)
key - defaultValue - public int getInitParameter(String key, int defaultValue)
key - defaultValue - public AtmosphereResourceFactory resourcesFactory()
AtmosphereResourceFactorypublic MetaBroadcaster metaBroadcaster()
DefaultMetaBroadcasterpublic AtmosphereResourceSessionFactory sessionFactory()
AtmosphereResourceSessionFactorypublic UUIDProvider uuidProvider()
UUIDProviderUUIDProviderpublic WebSocketFactory websocketFactory()
WebSocketFactoryWebSocketFactorypublic AtmosphereConfig populate(AtmosphereConfig config)
Copyright © 2016. All rights reserved.