public class DefaultWebEnvironment extends DefaultEnvironment implements MutableWebEnvironment
WebEnvironment implementation based on a backing Map instance.DEFAULT_SECURITY_MANAGER_KEY, objects| Constructor and Description |
|---|
DefaultWebEnvironment() |
| Modifier and Type | Method and Description |
|---|---|
FilterChainResolver |
getFilterChainResolver()
Returns the web application's
FilterChainResolver if one has been configured or null if one
is not available. |
SecurityManager |
getSecurityManager()
Returns the application's
SecurityManager instance accessible in the backing map using the
securityManagerName property as the lookup key. |
javax.servlet.ServletContext |
getServletContext()
Returns the
ServletContext associated with this WebEnvironment instance. |
WebSecurityManager |
getWebSecurityManager()
Returns the web application's security manager instance.
|
void |
setFilterChainResolver(FilterChainResolver filterChainResolver)
Sets the
WebEnvironment's FilterChainResolver. |
void |
setSecurityManager(SecurityManager securityManager) |
void |
setServletContext(javax.servlet.ServletContext servletContext)
Sets the
WebEnvironment's associated ServletContext instance. |
void |
setWebSecurityManager(WebSecurityManager wsm)
Sets the
WebEnvironment's WebSecurityManager. |
destroy, getObject, getObjects, getSecurityManagerName, lookupSecurityManager, setObject, setSecurityManagerNamepublic FilterChainResolver getFilterChainResolver()
WebEnvironmentFilterChainResolver if one has been configured or null if one
is not available.getFilterChainResolver in interface WebEnvironmentFilterChainResolver if one has been configured or null if one
is not available.public void setFilterChainResolver(FilterChainResolver filterChainResolver)
MutableWebEnvironmentWebEnvironment's FilterChainResolver.setFilterChainResolver in interface MutableWebEnvironmentfilterChainResolver - the WebEnvironment's FilterChainResolver.public SecurityManager getSecurityManager() throws IllegalStateException
DefaultEnvironmentSecurityManager instance accessible in the backing map using the
securityManagerName property as the lookup key.
This implementation guarantees that a non-null instance is always returned, as this is expected for
Environment API end-users. If subclasses have the need to perform the map lookup without this guarantee
(for example, during initialization when the instance may not have been added to the map yet), the
DefaultEnvironment.lookupSecurityManager() method is provided as an alternative.getSecurityManager in interface EnvironmentgetSecurityManager in class DefaultEnvironmentSecurityManager instance accessible in the backing map using the
securityManagerName property as the lookup key.IllegalStateExceptionpublic void setSecurityManager(SecurityManager securityManager)
setSecurityManager in class DefaultEnvironmentpublic WebSecurityManager getWebSecurityManager()
WebEnvironmentgetWebSecurityManager in interface WebEnvironmentpublic void setWebSecurityManager(WebSecurityManager wsm)
MutableWebEnvironmentWebEnvironment's WebSecurityManager.setWebSecurityManager in interface MutableWebEnvironmentwsm - the WebEnvironment's WebSecurityManager.public javax.servlet.ServletContext getServletContext()
WebEnvironmentServletContext associated with this WebEnvironment instance. A web application
typically only has a single WebEnvironment associated with its ServletContext.getServletContext in interface WebEnvironmentServletContext associated with this WebEnvironment instance.public void setServletContext(javax.servlet.ServletContext servletContext)
MutableWebEnvironmentWebEnvironment's associated ServletContext instance. Invoking this method merely
makes the ServletContext available to the underlying instance - it does not trigger initialization
behavior.setServletContext in interface MutableWebEnvironmentservletContext - the WebEnvironment's associated ServletContext instance.Copyright © 2004–2016 The Apache Software Foundation. All rights reserved.