blob: 3ce9e290b7e33bc8fb8c3bf0b38459afc8b8b8c7 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_65) on Tue Feb 25 18:15:51 EST 2014 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
EnvironmentLoader (Apache Shiro 1.2.3 API)
</TITLE>
<META NAME="date" CONTENT="2014-02-25">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="EnvironmentLoader (Apache Shiro 1.2.3 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EnvironmentLoader.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/shiro/web/env/DefaultWebEnvironment.html" title="class in org.apache.shiro.web.env"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoaderListener.html" title="class in org.apache.shiro.web.env"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/shiro/web/env/EnvironmentLoader.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="EnvironmentLoader.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.shiro.web.env</FONT>
<BR>
Class EnvironmentLoader</H2>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.shiro.web.env.EnvironmentLoader</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoaderListener.html" title="class in org.apache.shiro.web.env">EnvironmentLoaderListener</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <A HREF="../../../../../src-html/org/apache/shiro/web/env/EnvironmentLoader.html#line.92"><B>EnvironmentLoader</B></A><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
An <code>EnvironmentLoader</code> is responsible for loading a web application's Shiro <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A>
(which includes the web app's <A HREF="../../../../../org/apache/shiro/web/mgt/WebSecurityManager.html" title="interface in org.apache.shiro.web.mgt"><CODE>WebSecurityManager</CODE></A>) into the
<code>ServletContext</code> at application startup.
<p/>
In Shiro 1.1 and earlier, the Shiro ServletFilter was responsible for creating the <code>WebSecurityManager</code> and
any additional objects (security filters, etc). However, any component not filtered by the Shiro Filter (such
as other context listeners) was not able to easily acquire the these objects to perform security operations.
<p/>
Due to this, in Shiro 1.2 and later, this <code>EnvironmentLoader</code> (or more likely, the
<A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoaderListener.html" title="class in org.apache.shiro.web.env"><CODE>EnvironmentLoaderListener</CODE></A> subclass) is the preferred mechanism to initialize
a Shiro environment. The Shiro Filter, while still required for request filtering, will not perform this
initialization at startup if the <code>EnvironmentLoader</code> (or listener) runs first.
<h2>Usage</h2>
This implementation will look for two servlet context <code>context-param</code>s in <code>web.xml</code>:
<code>shiroEnvironmentClass</code> and <code>shiroConfigLocations</code> that customize how the <code>WebEnvironment</code> instance
will be initialized.
<h3>shiroEnvironmentClass</h3>
The <code>shiroEnvironmentClass</code> <code>context-param</code>, if it exists, allows you to specify the
fully-qualified implementation class name of the <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> to instantiate. For example:
<pre>
&lt;context-param&gt;
&lt;param-name&gt;shiroEnvironmentClass&lt;/param-name&gt;
&lt;param-value&gt;com.foo.bar.shiro.MyWebEnvironment&lt;/param-value&gt;
&lt;/context-param&gt;
</pre>
If not specified, the default value is the <A HREF="../../../../../org/apache/shiro/web/env/IniWebEnvironment.html" title="class in org.apache.shiro.web.env"><CODE>IniWebEnvironment</CODE></A> class, which assumes Shiro's default
<a href="http://shiro.apache.org/configuration.html">INI configuration format</a>
<h3>shiroConfigLocations</h3>
The <code>shiroConfigLocations</code> <code>context-param</code>, if it exists, allows you to specify the config location(s)
(resource path(s)) that will be relayed to the instantiated <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A>. For example:
<pre>
&lt;context-param&gt;
&lt;param-name&gt;shiroConfigLocations&lt;/param-name&gt;
&lt;param-value&gt;/WEB-INF/someLocation/shiro.ini&lt;/param-value&gt;
&lt;/context-param&gt;
</pre>
The <code>WebEnvironment</code> implementation must implement the <A HREF="../../../../../org/apache/shiro/config/ResourceConfigurable.html" title="interface in org.apache.shiro.config"><CODE>ResourceConfigurable</CODE></A> interface if it is to
acquire the <code>shiroConfigLocations</code> value.
<p/>
If this <code>context-param</code> is not specified, the <code>WebEnvironment</code> instance determines default resource
lookup behavior. For example, the <A HREF="../../../../../org/apache/shiro/web/env/IniWebEnvironment.html" title="class in org.apache.shiro.web.env"><CODE>IniWebEnvironment</CODE></A> will check the following two locations for INI config
by default (in order):
<ol>
<li>/WEB-INF/shiro.ini</li>
<li>classpath:shiro.ini</li>
</ol>
<h2>Web Security Enforcement</h2>
Using this loader will only initialize Shiro's environment in a web application - it will not filter web requests or
perform web-specific security operations. To do this, you must ensure that you have also configured the
<A HREF="../../../../../org/apache/shiro/web/servlet/ShiroFilter.html" title="class in org.apache.shiro.web.servlet"><CODE>ShiroFilter</CODE></A> in <code>web.xml</code>.
<p/>
Finally, it should be noted that this implementation was based on ideas in Spring 3's
<code>org.springframework.web.context.ContextLoader</code> implementation - no need to reinvent the wheel for this common
behavior.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>1.2</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoaderListener.html" title="class in org.apache.shiro.web.env"><CODE>EnvironmentLoaderListener</CODE></A>,
<A HREF="../../../../../org/apache/shiro/web/servlet/ShiroFilter.html" title="class in org.apache.shiro.web.servlet"><CODE>ShiroFilter</CODE></A></DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#CONFIG_LOCATIONS_PARAM">CONFIG_LOCATIONS_PARAM</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Servlet Context config param for the resource path to use for configuring the <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> instance:
<code>shiroConfigLocations</code></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#ENVIRONMENT_ATTRIBUTE_KEY">ENVIRONMENT_ATTRIBUTE_KEY</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#ENVIRONMENT_CLASS_PARAM">ENVIRONMENT_CLASS_PARAM</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Servlet Context config param for specifying the <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> implementation class to use:
<code>shiroEnvironmentClass</code></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#EnvironmentLoader()">EnvironmentLoader</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#createEnvironment(javax.servlet.ServletContext)">createEnvironment</A></B>(<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</A>&nbsp;sc)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instantiates a <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> based on the specified ServletContext.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#customizeEnvironment(org.apache.shiro.web.env.WebEnvironment)">customizeEnvironment</A></B>(<A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</A>&nbsp;environment)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#destroyEnvironment(javax.servlet.ServletContext)">destroyEnvironment</A></B>(<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</A>&nbsp;servletContext)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Destroys the <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> for the given servlet context.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#determineWebEnvironmentClass(javax.servlet.ServletContext)">determineWebEnvironmentClass</A></B>(<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</A>&nbsp;servletContext)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the WebEnvironment implementation class to use, either the default
<A HREF="../../../../../org/apache/shiro/web/env/IniWebEnvironment.html" title="class in org.apache.shiro.web.env"><CODE>IniWebEnvironment</CODE></A> or a custom class if specified.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#initEnvironment(javax.servlet.ServletContext)">initEnvironment</A></B>(<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</A>&nbsp;servletContext)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes Shiro's <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> instance for the specified <code>ServletContext</code> based on the
<A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#CONFIG_LOCATIONS_PARAM"><CODE>CONFIG_LOCATIONS_PARAM</CODE></A> value.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="ENVIRONMENT_CLASS_PARAM"><!-- --></A><H3>
ENVIRONMENT_CLASS_PARAM</H3>
<PRE>
public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/shiro/web/env/EnvironmentLoader.html#line.98"><B>ENVIRONMENT_CLASS_PARAM</B></A></PRE>
<DL>
<DD>Servlet Context config param for specifying the <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> implementation class to use:
<code>shiroEnvironmentClass</code>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.shiro.web.env.EnvironmentLoader.ENVIRONMENT_CLASS_PARAM">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="CONFIG_LOCATIONS_PARAM"><!-- --></A><H3>
CONFIG_LOCATIONS_PARAM</H3>
<PRE>
public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/shiro/web/env/EnvironmentLoader.html#line.104"><B>CONFIG_LOCATIONS_PARAM</B></A></PRE>
<DL>
<DD>Servlet Context config param for the resource path to use for configuring the <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> instance:
<code>shiroConfigLocations</code>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.shiro.web.env.EnvironmentLoader.CONFIG_LOCATIONS_PARAM">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="ENVIRONMENT_ATTRIBUTE_KEY"><!-- --></A><H3>
ENVIRONMENT_ATTRIBUTE_KEY</H3>
<PRE>
public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/shiro/web/env/EnvironmentLoader.html#line.106"><B>ENVIRONMENT_ATTRIBUTE_KEY</B></A></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="EnvironmentLoader()"><!-- --></A><H3>
EnvironmentLoader</H3>
<PRE>
public <A HREF="../../../../../src-html/org/apache/shiro/web/env/EnvironmentLoader.html#line.92"><B>EnvironmentLoader</B></A>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="initEnvironment(javax.servlet.ServletContext)"><!-- --></A><H3>
initEnvironment</H3>
<PRE>
public <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</A> <A HREF="../../../../../src-html/org/apache/shiro/web/env/EnvironmentLoader.html#line.119"><B>initEnvironment</B></A>(<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</A>&nbsp;servletContext)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Initializes Shiro's <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> instance for the specified <code>ServletContext</code> based on the
<A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#CONFIG_LOCATIONS_PARAM"><CODE>CONFIG_LOCATIONS_PARAM</CODE></A> value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>servletContext</CODE> - current servlet context
<DT><B>Returns:</B><DD>the new Shiro <code>WebEnvironment</code> instance.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if an existing WebEnvironment has already been initialized and associated with
the specified <code>ServletContext</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="determineWebEnvironmentClass(javax.servlet.ServletContext)"><!-- --></A><H3>
determineWebEnvironmentClass</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt; <A HREF="../../../../../src-html/org/apache/shiro/web/env/EnvironmentLoader.html#line.165"><B>determineWebEnvironmentClass</B></A>(<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</A>&nbsp;servletContext)</PRE>
<DL>
<DD>Return the WebEnvironment implementation class to use, either the default
<A HREF="../../../../../org/apache/shiro/web/env/IniWebEnvironment.html" title="class in org.apache.shiro.web.env"><CODE>IniWebEnvironment</CODE></A> or a custom class if specified.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>servletContext</CODE> - current servlet context
<DT><B>Returns:</B><DD>the WebEnvironment implementation class to use<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#ENVIRONMENT_CLASS_PARAM"><CODE>ENVIRONMENT_CLASS_PARAM</CODE></A>,
<A HREF="../../../../../org/apache/shiro/web/env/IniWebEnvironment.html" title="class in org.apache.shiro.web.env"><CODE>IniWebEnvironment</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="createEnvironment(javax.servlet.ServletContext)"><!-- --></A><H3>
createEnvironment</H3>
<PRE>
protected <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</A> <A HREF="../../../../../src-html/org/apache/shiro/web/env/EnvironmentLoader.html#line.193"><B>createEnvironment</B></A>(<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</A>&nbsp;sc)</PRE>
<DL>
<DD>Instantiates a <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> based on the specified ServletContext.
<p/>
This implementation <A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#determineWebEnvironmentClass(javax.servlet.ServletContext)"><CODE>determines</CODE></A> a
<A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> implementation class to use. That class is instantiated, configured, and returned.
<p/>
This allows custom <code>WebEnvironment</code> implementations to be specified via a ServletContext init-param if
desired. If not specified, the default <A HREF="../../../../../org/apache/shiro/web/env/IniWebEnvironment.html" title="class in org.apache.shiro.web.env"><CODE>IniWebEnvironment</CODE></A> implementation will be used.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sc</CODE> - current servlet context
<DT><B>Returns:</B><DD>the constructed Shiro WebEnvironment instance<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/web/env/MutableWebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>MutableWebEnvironment</CODE></A>,
<A HREF="../../../../../org/apache/shiro/config/ResourceConfigurable.html" title="interface in org.apache.shiro.config"><CODE>ResourceConfigurable</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="customizeEnvironment(org.apache.shiro.web.env.WebEnvironment)"><!-- --></A><H3>
customizeEnvironment</H3>
<PRE>
protected void <A HREF="../../../../../src-html/org/apache/shiro/web/env/EnvironmentLoader.html#line.226"><B>customizeEnvironment</B></A>(<A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</A>&nbsp;environment)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="destroyEnvironment(javax.servlet.ServletContext)"><!-- --></A><H3>
destroyEnvironment</H3>
<PRE>
public void <A HREF="../../../../../src-html/org/apache/shiro/web/env/EnvironmentLoader.html#line.234"><B>destroyEnvironment</B></A>(<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</A>&nbsp;servletContext)</PRE>
<DL>
<DD>Destroys the <A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><CODE>WebEnvironment</CODE></A> for the given servlet context.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>servletContext</CODE> - the ServletContext attributed to the WebSecurityManager</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EnvironmentLoader.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/shiro/web/env/DefaultWebEnvironment.html" title="class in org.apache.shiro.web.env"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoaderListener.html" title="class in org.apache.shiro.web.env"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/shiro/web/env/EnvironmentLoader.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="EnvironmentLoader.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 2004-2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>