Package org.apache.shiro.web.env
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.util.Destroyable,MutableWebEnvironment,WebEnvironment
- Direct Known Subclasses:
ResourceBasedWebEnvironment
public class DefaultWebEnvironment extends org.apache.shiro.env.DefaultEnvironment implements MutableWebEnvironment
DefaultWebEnvironmentimplementation based on a backingMapinstance.- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor Description DefaultWebEnvironment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilterChainResolvergetFilterChainResolver()Returns the web application'sFilterChainResolverif one has been configured ornullif one is not available.org.apache.shiro.mgt.SecurityManagergetSecurityManager()javax.servlet.ServletContextgetServletContext()Returns theServletContextassociated with thisWebEnvironmentinstance.WebSecurityManagergetWebSecurityManager()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.voidsetWebSecurityManager(WebSecurityManager wsm)Sets theWebEnvironment'sWebSecurityManager.
-
-
-
Method Detail
-
getFilterChainResolver
public FilterChainResolver 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
public void setFilterChainResolver(FilterChainResolver filterChainResolver)
Description copied from interface:MutableWebEnvironmentSets theWebEnvironment'sFilterChainResolver.- Specified by:
setFilterChainResolverin interfaceMutableWebEnvironment- Parameters:
filterChainResolver- theWebEnvironment'sFilterChainResolver.
-
getSecurityManager
public org.apache.shiro.mgt.SecurityManager getSecurityManager() throws IllegalStateException- Specified by:
getSecurityManagerin interfaceorg.apache.shiro.env.Environment- Overrides:
getSecurityManagerin classorg.apache.shiro.env.DefaultEnvironment- Throws:
IllegalStateException
-
setSecurityManager
public void setSecurityManager(org.apache.shiro.mgt.SecurityManager securityManager)
- Overrides:
setSecurityManagerin classorg.apache.shiro.env.DefaultEnvironment
-
getWebSecurityManager
public WebSecurityManager 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
public void setWebSecurityManager(WebSecurityManager wsm)
Description copied from interface:MutableWebEnvironmentSets theWebEnvironment'sWebSecurityManager.- Specified by:
setWebSecurityManagerin interfaceMutableWebEnvironment- Parameters:
wsm- theWebEnvironment'sWebSecurityManager.
-
getServletContext
public javax.servlet.ServletContext 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
public void setServletContext(javax.servlet.ServletContext servletContext)
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.
-
-