Class DefaultWebEnvironment
java.lang.Object
org.apache.shiro.env.DefaultEnvironment
org.apache.shiro.web.env.DefaultWebEnvironment
- All Implemented Interfaces:
org.apache.shiro.env.Environment,org.apache.shiro.env.NamedObjectEnvironment,org.apache.shiro.lang.util.Destroyable,MutableWebEnvironment,WebEnvironment
- Direct Known Subclasses:
ResourceBasedWebEnvironment
public class DefaultWebEnvironment
extends org.apache.shiro.env.DefaultEnvironment
implements MutableWebEnvironment
Default
WebEnvironment implementation based on a backing Map instance.- Since:
- 1.2
-
Field Summary
Fields inherited from class org.apache.shiro.env.DefaultEnvironment
DEFAULT_SECURITY_MANAGER_KEY, objects -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the web application'sFilterChainResolverif one has been configured ornullif one is not available.org.apache.shiro.mgt.SecurityManagerjavax.servlet.ServletContextReturns theServletContextassociated with thisWebEnvironmentinstance.Returns the configuration object used to configure the ShiroFilter.Returns the web application's security manager instance.voidsetFilterChainResolver(FilterChainResolver filterChainResolver) Sets theWebEnvironment'sFilterChainResolver.voidsetSecurityManager(org.apache.shiro.mgt.SecurityManager securityManager) voidsetServletContext(javax.servlet.ServletContext servletContext) Sets theWebEnvironment's associatedServletContextinstance.voidsetShiroFilterConfiguration(ShiroFilterConfiguration filterConfiguration) Sets theWebEnvironment'sShiroFilterConfiguration.voidSets theWebEnvironment'sWebSecurityManager.Methods inherited from class org.apache.shiro.env.DefaultEnvironment
destroy, getObject, getObjects, getSecurityManagerName, lookupSecurityManager, setObject, setSecurityManagerName
-
Constructor Details
-
DefaultWebEnvironment
public DefaultWebEnvironment()
-
-
Method Details
-
getFilterChainResolver
Description copied from interface:WebEnvironmentReturns the web application'sFilterChainResolverif one has been configured ornullif one is not available.- Specified by:
getFilterChainResolverin interfaceWebEnvironment- Returns:
- the web application's
FilterChainResolverif one has been configured ornullif one is not available.
-
setFilterChainResolver
Description copied from interface:MutableWebEnvironmentSets theWebEnvironment'sFilterChainResolver.- Specified by:
setFilterChainResolverin interfaceMutableWebEnvironment- Parameters:
filterChainResolver- theWebEnvironment'sFilterChainResolver.
-
getSecurityManager
- Specified by:
getSecurityManagerin interfaceorg.apache.shiro.env.Environment- Overrides:
getSecurityManagerin classorg.apache.shiro.env.DefaultEnvironment- Throws:
IllegalStateException
-
setSecurityManager
- Overrides:
setSecurityManagerin classorg.apache.shiro.env.DefaultEnvironment
-
getWebSecurityManager
Description copied from interface:WebEnvironmentReturns the web application's security manager instance.- Specified by:
getWebSecurityManagerin interfaceWebEnvironment- Returns:
- the web application's security manager instance.
-
setWebSecurityManager
Description copied from interface:MutableWebEnvironmentSets theWebEnvironment'sWebSecurityManager.- Specified by:
setWebSecurityManagerin interfaceMutableWebEnvironment- Parameters:
wsm- theWebEnvironment'sWebSecurityManager.
-
getServletContext
Description copied from interface:WebEnvironmentReturns theServletContextassociated with thisWebEnvironmentinstance. A web application typically only has a singleWebEnvironmentassociated with itsServletContext.- Specified by:
getServletContextin interfaceWebEnvironment- Returns:
- the
ServletContextassociated with thisWebEnvironmentinstance.
-
setServletContext
Description copied from interface:MutableWebEnvironmentSets theWebEnvironment's associatedServletContextinstance. Invoking this method merely makes theServletContextavailable to the underlying instance - it does not trigger initialization behavior.- Specified by:
setServletContextin interfaceMutableWebEnvironment- Parameters:
servletContext- theWebEnvironment's associatedServletContextinstance.
-
setShiroFilterConfiguration
Description copied from interface:MutableWebEnvironmentSets theWebEnvironment'sShiroFilterConfiguration.- Specified by:
setShiroFilterConfigurationin interfaceMutableWebEnvironment- Parameters:
filterConfiguration- theWebEnvironment'sShiroFilterConfiguration.
-
getShiroFilterConfiguration
Description copied from interface:WebEnvironmentReturns the configuration object used to configure the ShiroFilter.- Specified by:
getShiroFilterConfigurationin interfaceWebEnvironment- Returns:
- the configuration object used to configure the ShiroFilter.
-