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, setSecurityManagerName
public DefaultWebEnvironment()
public FilterChainResolver getFilterChainResolver()
WebEnvironment
FilterChainResolver
if one has been configured or null
if one
is not available.getFilterChainResolver
in interface WebEnvironment
FilterChainResolver
if one has been configured or null
if one
is not available.public void setFilterChainResolver(FilterChainResolver filterChainResolver)
MutableWebEnvironment
WebEnvironment
's FilterChainResolver
.setFilterChainResolver
in interface MutableWebEnvironment
filterChainResolver
- the WebEnvironment
's FilterChainResolver
.public SecurityManager getSecurityManager() throws IllegalStateException
DefaultEnvironment
SecurityManager
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 Environment
getSecurityManager
in class DefaultEnvironment
SecurityManager
instance accessible in the backing map using the
securityManagerName
property as the lookup key.IllegalStateException
public void setSecurityManager(SecurityManager securityManager)
setSecurityManager
in class DefaultEnvironment
public WebSecurityManager getWebSecurityManager()
WebEnvironment
getWebSecurityManager
in interface WebEnvironment
public void setWebSecurityManager(WebSecurityManager wsm)
MutableWebEnvironment
WebEnvironment
's WebSecurityManager
.setWebSecurityManager
in interface MutableWebEnvironment
wsm
- the WebEnvironment
's WebSecurityManager
.public javax.servlet.ServletContext getServletContext()
WebEnvironment
ServletContext
associated with this WebEnvironment
instance. A web application
typically only has a single WebEnvironment
associated with its ServletContext
.getServletContext
in interface WebEnvironment
ServletContext
associated with this WebEnvironment
instance.public void setServletContext(javax.servlet.ServletContext servletContext)
MutableWebEnvironment
WebEnvironment
'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 MutableWebEnvironment
servletContext
- the WebEnvironment
's associated ServletContext
instance.Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.