blob: 54ddf53369aa47f663f1605eabf8eb42323a1651 [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:48 EST 2014 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
DefaultEnvironment (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="DefaultEnvironment (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/DefaultEnvironment.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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../org/apache/shiro/env/Environment.html" title="interface in org.apache.shiro.env"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/shiro/env/DefaultEnvironment.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DefaultEnvironment.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.env</FONT>
<BR>
Class DefaultEnvironment</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.env.DefaultEnvironment</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/apache/shiro/env/Environment.html" title="interface in org.apache.shiro.env">Environment</A>, <A HREF="../../../../org/apache/shiro/env/NamedObjectEnvironment.html" title="interface in org.apache.shiro.env">NamedObjectEnvironment</A>, <A HREF="../../../../org/apache/shiro/util/Destroyable.html" title="interface in org.apache.shiro.util">Destroyable</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/shiro/web/env/DefaultWebEnvironment.html" title="class in org.apache.shiro.web.env">DefaultWebEnvironment</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.34"><B>DefaultEnvironment</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><DT>implements <A HREF="../../../../org/apache/shiro/env/NamedObjectEnvironment.html" title="interface in org.apache.shiro.env">NamedObjectEnvironment</A>, <A HREF="../../../../org/apache/shiro/util/Destroyable.html" title="interface in org.apache.shiro.util">Destroyable</A></DL>
</PRE>
<P>
Simple/default <code>Environment</code> implementation that stores Shiro objects as key-value pairs in a
<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> instance. The key is the object name, the value is the object itself.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>1.2</DD>
</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/env/DefaultEnvironment.html#DEFAULT_SECURITY_MANAGER_KEY">DEFAULT_SECURITY_MANAGER_KEY</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default name under which the application's <code>SecurityManager</code> instance may be acquired, equal to
<code>securityManager</code>.</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/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<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="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/shiro/env/DefaultEnvironment.html#objects">objects</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/env/DefaultEnvironment.html#DefaultEnvironment()">DefaultEnvironment</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new instance with a thread-safe <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent"><CODE>ConcurrentHashMap</CODE></A> backing map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/shiro/env/DefaultEnvironment.html#DefaultEnvironment(java.util.Map)">DefaultEnvironment</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<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>,?&gt;&nbsp;seed)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new instance with the specified backing map.</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/shiro/env/DefaultEnvironment.html#destroy()">destroy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when this object is being destroyed, allowing any necessary cleanup of internal resources.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;T&gt; T</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/shiro/env/DefaultEnvironment.html#getObject(java.lang.String, java.lang.Class)">getObject</A></B>(<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>&nbsp;name,
<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;T&gt;&nbsp;requiredType)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the object in Shiro's environment with the specified name and type or <code>null</code> if
no object with that name was found.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<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="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/shiro/env/DefaultEnvironment.html#getObjects()">getObjects</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the live (modifiable) internal objects collection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/shiro/env/DefaultEnvironment.html#getSecurityManager()">getSecurityManager</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the application's <code>SecurityManager</code> instance accessible in the backing map using the
<A HREF="../../../../org/apache/shiro/env/DefaultEnvironment.html#getSecurityManagerName()"><CODE>securityManagerName</CODE></A> property as the lookup key.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&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/env/DefaultEnvironment.html#getSecurityManagerName()">getSecurityManagerName</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of the <A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt"><CODE>SecurityManager</CODE></A> instance in the backing map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/shiro/env/DefaultEnvironment.html#lookupSecurityManager()">lookupSecurityManager</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Looks up the <code>SecurityManager</code> instance in the backing map without performing any non-null guarantees.</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/env/DefaultEnvironment.html#setObject(java.lang.String, java.lang.Object)">setObject</A></B>(<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>&nbsp;name,
<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>&nbsp;instance)</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/env/DefaultEnvironment.html#setSecurityManager(org.apache.shiro.mgt.SecurityManager)">setSecurityManager</A></B>(<A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</A>&nbsp;securityManager)</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/env/DefaultEnvironment.html#setSecurityManagerName(java.lang.String)">setSecurityManagerName</A></B>(<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>&nbsp;securityManagerName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the name of the <A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt"><CODE>SecurityManager</CODE></A> instance in the backing map.</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="DEFAULT_SECURITY_MANAGER_KEY"><!-- --></A><H3>
DEFAULT_SECURITY_MANAGER_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/env/DefaultEnvironment.html#line.40"><B>DEFAULT_SECURITY_MANAGER_KEY</B></A></PRE>
<DL>
<DD>The default name under which the application's <code>SecurityManager</code> instance may be acquired, equal to
<code>securityManager</code>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.shiro.env.DefaultEnvironment.DEFAULT_SECURITY_MANAGER_KEY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="objects"><!-- --></A><H3>
objects</H3>
<PRE>
protected final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<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="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&gt; <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.42"><B>objects</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="DefaultEnvironment()"><!-- --></A><H3>
DefaultEnvironment</H3>
<PRE>
public <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.48"><B>DefaultEnvironment</B></A>()</PRE>
<DL>
<DD>Creates a new instance with a thread-safe <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent"><CODE>ConcurrentHashMap</CODE></A> backing map.
<P>
</DL>
<HR>
<A NAME="DefaultEnvironment(java.util.Map)"><!-- --></A><H3>
DefaultEnvironment</H3>
<PRE>
public <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.58"><B>DefaultEnvironment</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<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>,?&gt;&nbsp;seed)</PRE>
<DL>
<DD>Creates a new instance with the specified backing map.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>seed</CODE> - backing map to use to maintain Shiro objects.</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="getSecurityManager()"><!-- --></A><H3>
getSecurityManager</H3>
<PRE>
public <A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</A> <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.78"><B>getSecurityManager</B></A>()
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>Returns the application's <code>SecurityManager</code> instance accessible in the backing map using the
<A HREF="../../../../org/apache/shiro/env/DefaultEnvironment.html#getSecurityManagerName()"><CODE>securityManagerName</CODE></A> property as the lookup key.
<p/>
This implementation guarantees that a non-null instance is always returned, as this is expected for
Environment API end-users. If subclasses have the need to perform the map lookup without this guarantee
(for example, during initialization when the instance may not have been added to the map yet), the
<A HREF="../../../../org/apache/shiro/env/DefaultEnvironment.html#lookupSecurityManager()"><CODE>lookupSecurityManager()</CODE></A> method is provided as an alternative.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/shiro/env/Environment.html#getSecurityManager()">getSecurityManager</A></CODE> in interface <CODE><A HREF="../../../../org/apache/shiro/env/Environment.html" title="interface in org.apache.shiro.env">Environment</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the application's <code>SecurityManager</code> instance accessible in the backing map using the
<A HREF="../../../../org/apache/shiro/env/DefaultEnvironment.html#getSecurityManagerName()"><CODE>securityManagerName</CODE></A> property as the lookup key.
<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></DL>
</DD>
</DL>
<HR>
<A NAME="setSecurityManager(org.apache.shiro.mgt.SecurityManager)"><!-- --></A><H3>
setSecurityManager</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.87"><B>setSecurityManager</B></A>(<A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</A>&nbsp;securityManager)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="lookupSecurityManager()"><!-- --></A><H3>
lookupSecurityManager</H3>
<PRE>
protected <A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt">SecurityManager</A> <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.100"><B>lookupSecurityManager</B></A>()</PRE>
<DL>
<DD>Looks up the <code>SecurityManager</code> instance in the backing map without performing any non-null guarantees.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the <code>SecurityManager</code> in the backing map, or <code>null</code> if it has not yet been populated.</DL>
</DD>
</DL>
<HR>
<A NAME="getSecurityManagerName()"><!-- --></A><H3>
getSecurityManagerName</H3>
<PRE>
public <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/env/DefaultEnvironment.html#line.112"><B>getSecurityManagerName</B></A>()</PRE>
<DL>
<DD>Returns the name of the <A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt"><CODE>SecurityManager</CODE></A> instance in the backing map. Used as a key to lookup the
instance. Unless set otherwise, the default is <code>securityManager</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the name of the <A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt"><CODE>SecurityManager</CODE></A> instance in the backing map. Used as a key to lookup the
instance.</DL>
</DD>
</DL>
<HR>
<A NAME="setSecurityManagerName(java.lang.String)"><!-- --></A><H3>
setSecurityManagerName</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.123"><B>setSecurityManagerName</B></A>(<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>&nbsp;securityManagerName)</PRE>
<DL>
<DD>Sets the name of the <A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt"><CODE>SecurityManager</CODE></A> instance in the backing map. Used as a key to lookup the
instance. Unless set otherwise, the default is <code>securityManager</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>securityManagerName</CODE> - the name of the <A HREF="../../../../org/apache/shiro/mgt/SecurityManager.html" title="interface in org.apache.shiro.mgt"><CODE>SecurityManager</CODE></A> instance in the backing map. Used as a key
to lookup the instance. </DL>
</DD>
</DL>
<HR>
<A NAME="getObjects()"><!-- --></A><H3>
getObjects</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<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="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&gt; <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.132"><B>getObjects</B></A>()</PRE>
<DL>
<DD>Returns the live (modifiable) internal objects collection.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the live (modifiable) internal objects collection.</DL>
</DD>
</DL>
<HR>
<A NAME="getObject(java.lang.String, java.lang.Class)"><!-- --></A><H3>
getObject</H3>
<PRE>
public &lt;T&gt; T <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.137"><B>getObject</B></A>(<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>&nbsp;name,
<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;T&gt;&nbsp;requiredType)
throws <A HREF="../../../../org/apache/shiro/env/RequiredTypeException.html" title="class in org.apache.shiro.env">RequiredTypeException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/shiro/env/NamedObjectEnvironment.html#getObject(java.lang.String, java.lang.Class)">NamedObjectEnvironment</A></CODE></B></DD>
<DD>Returns the object in Shiro's environment with the specified name and type or <code>null</code> if
no object with that name was found.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/shiro/env/NamedObjectEnvironment.html#getObject(java.lang.String, java.lang.Class)">getObject</A></CODE> in interface <CODE><A HREF="../../../../org/apache/shiro/env/NamedObjectEnvironment.html" title="interface in org.apache.shiro.env">NamedObjectEnvironment</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Type Parameters:</B><DD><CODE>T</CODE> - the type of the class<DT><B>Parameters:</B><DD><CODE>name</CODE> - the assigned name of the object.<DD><CODE>requiredType</CODE> - the class to which the discovered object must be assignable.
<DT><B>Returns:</B><DD>the object in Shiro's environment with the specified name (of the specified type) or <code>null</code> if
no object with that name was found.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/shiro/env/RequiredTypeException.html" title="class in org.apache.shiro.env">RequiredTypeException</A></CODE> - if the discovered object does not equal, extend, or implement the specified class.</DL>
</DD>
</DL>
<HR>
<A NAME="setObject(java.lang.String, java.lang.Object)"><!-- --></A><H3>
setObject</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.155"><B>setObject</B></A>(<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>&nbsp;name,
<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>&nbsp;instance)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="destroy()"><!-- --></A><H3>
destroy</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/shiro/env/DefaultEnvironment.html#line.167"><B>destroy</B></A>()
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/shiro/util/Destroyable.html#destroy()">Destroyable</A></CODE></B></DD>
<DD>Called when this object is being destroyed, allowing any necessary cleanup of internal resources.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/shiro/util/Destroyable.html#destroy()">destroy</A></CODE> in interface <CODE><A HREF="../../../../org/apache/shiro/util/Destroyable.html" title="interface in org.apache.shiro.util">Destroyable</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE> - if an exception occurs during object destruction.</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/DefaultEnvironment.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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../org/apache/shiro/env/Environment.html" title="interface in org.apache.shiro.env"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/shiro/env/DefaultEnvironment.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DefaultEnvironment.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>