| <!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:16:44 EST 2014 --> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <TITLE> |
| EnvironmentLoader (Apache Shiro :: Web 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 :: Web 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> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EnvironmentLoader.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../org/apache/shiro/web/env/DefaultWebEnvironment.html" title="class in org.apache.shiro.web.env"><B>PREV CLASS</B></A> |
| <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> |
| <A HREF="EnvironmentLoader.html" target="_top"><B>NO FRAMES</B></A> |
| <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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/j2se/1.5.0/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 <B>EnvironmentLoader</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/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> |
| <context-param> |
| <param-name>shiroEnvironmentClass</param-name> |
| <param-value>com.foo.bar.shiro.MyWebEnvironment</param-value> |
| </context-param> |
| </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> |
| <context-param> |
| <param-name>shiroConfigLocations</param-name> |
| <param-value>/WEB-INF/someLocation/shiro.ini</param-value> |
| </context-param> |
| </pre> |
| The <code>WebEnvironment</code> implementation must implement the <CODE>ResourceConfigurable</CODE> 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 <A HREF="http://java.sun.com/j2se/1.5.0/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> |
| 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 <A HREF="http://java.sun.com/j2se/1.5.0/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> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/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> |
| 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> |
| |
| <!-- ======== 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> |
| </TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== 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 <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>(javax.servlet.ServletContext sc)</CODE> |
| |
| <BR> |
| 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 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> environment)</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#destroyEnvironment(javax.servlet.ServletContext)">destroyEnvironment</A></B>(javax.servlet.ServletContext servletContext)</CODE> |
| |
| <BR> |
| 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 <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><?></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#determineWebEnvironmentClass(javax.servlet.ServletContext)">determineWebEnvironmentClass</A></B>(javax.servlet.ServletContext servletContext)</CODE> |
| |
| <BR> |
| 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> <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>(javax.servlet.ServletContext servletContext)</CODE> |
| |
| <BR> |
| 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> |
| <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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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> |
| |
| <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/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>ENVIRONMENT_CLASS_PARAM</B></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/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>CONFIG_LOCATIONS_PARAM</B></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/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>ENVIRONMENT_ATTRIBUTE_KEY</B></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 <B>EnvironmentLoader</B>()</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> <B>initEnvironment</B>(javax.servlet.ServletContext servletContext) |
| throws <A HREF="http://java.sun.com/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><?> <B>determineWebEnvironmentClass</B>(javax.servlet.ServletContext 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> <B>createEnvironment</B>(javax.servlet.ServletContext 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>, |
| <CODE>ResourceConfigurable</CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="customizeEnvironment(org.apache.shiro.web.env.WebEnvironment)"><!-- --></A><H3> |
| customizeEnvironment</H3> |
| <PRE> |
| protected void <B>customizeEnvironment</B>(<A HREF="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</A> environment)</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="destroyEnvironment(javax.servlet.ServletContext)"><!-- --></A><H3> |
| destroyEnvironment</H3> |
| <PRE> |
| public void <B>destroyEnvironment</B>(javax.servlet.ServletContext 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> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EnvironmentLoader.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../org/apache/shiro/web/env/DefaultWebEnvironment.html" title="class in org.apache.shiro.web.env"><B>PREV CLASS</B></A> |
| <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> |
| <A HREF="EnvironmentLoader.html" target="_top"><B>NO FRAMES</B></A> |
| <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 2004-2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |