public class IniWebEnvironment extends ResourceBasedWebEnvironmentimplements Initializable , Destroyable
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_WEB_INI_RESOURCE_PATH
|
DEFAULT_SECURITY_MANAGER_KEY, objects| Constructor and Description |
|---|
IniWebEnvironment()
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure()
|
protected FilterChainResolver |
createFilterChainResolver()
|
protected Ini |
createIni(String
Creates an
Ini instance reflecting the specified path, or
null if the path does not exist and is not required.
|
protected WebSecurityManager |
createWebSecurityManager()
|
protected String |
getDefaultConfigLocations()
Returns an array with two elements,
/WEB-INF/shiro.ini and
classpath:shiro.ini.
|
protected Ini |
getDefaultIni()
|
Ini |
getIni()
Returns the
Ini instance reflecting this WebEnvironment's configuration.
|
protected Ini |
getSpecifiedIni(String
|
void |
init()
|
void |
setIni(Ini
Allows for configuration via a direct
Ini instance instead of via
config locations.
|
getConfigLocations, setConfigLocations, setConfigLocationsgetFilterChainResolver, getSecurityManager, getServletContext, getWebSecurityManager, setFilterChainResolver, setSecurityManager, setServletContext, setWebSecurityManagerdestroy, getObject, getObjects, getSecurityManagerName, lookupSecurityManager, setObject, setSecurityManagerNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroypublic static final StringDEFAULT_WEB_INI_RESOURCE_PATH
public void init()
protected void configure()
protected InigetSpecifiedIni(String [] configLocations) throws ConfigurationException
ConfigurationException
protected InigetDefaultIni()
protected InicreateIni(String configLocation, boolean required) throws ConfigurationException
Ini instance reflecting the specified path, or
null if the path does not exist and is not required.
If the path is required and does not exist or is empty, a
ConfigurationException will be thrown.
configLocation - the resource path to load into an
Ini instance.
required - if the path must exist and be converted to a non-empty
Ini instance.
Ini instance reflecting the specified path, or
null if the path does not exist and is not required.
ConfigurationException - if the path is required but results in a null or empty Ini instance.
protected FilterChainResolvercreateFilterChainResolver()
protected WebSecurityManagercreateWebSecurityManager()
protected String[] getDefaultConfigLocations()
/WEB-INF/shiro.ini and
classpath:shiro.ini.
/WEB-INF/shiro.ini and
classpath:shiro.ini.
public InigetIni()
Ini instance reflecting this WebEnvironment's configuration.
Ini instance reflecting this WebEnvironment's configuration.
public void setIni(Iniini)
Ini instance instead of via
config locations.
If the specified instance is null or empty, the fallback/default resource-based configuration will be used.
ini - the ini instance to use for creation.