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.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)
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.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()
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
.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 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
.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)
s
- a AtmosphereConfig.ShutdownHook
public AtmosphereConfig startupHook(AtmosphereConfig.StartupHook s)
AtmosphereConfig.StartupHook
. If the AtmosphereFramework.isInit
return true, the
StartupHook will be executed immediately.s
- a AtmosphereConfig.StartupHook
public 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()
AtmosphereResourceFactory
public MetaBroadcaster metaBroadcaster()
DefaultMetaBroadcaster
public AtmosphereResourceSessionFactory sessionFactory()
AtmosphereResourceSessionFactory
public UUIDProvider uuidProvider()
UUIDProvider
UUIDProvider
public WebSocketFactory websocketFactory()
WebSocketFactory
WebSocketFactory
public AtmosphereConfig populate(AtmosphereConfig config)
Copyright © 2016. All rights reserved.