blob: 227d7c10b20e59e2d4894d3956f9809543f4e7bb [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 Fri Mar 04 17:58:57 EST 2016 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
FilterChainManager (Apache Shiro 1.2.4 API)
</TITLE>
<META NAME="date" CONTENT="2016-03-04">
<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="FilterChainManager (Apache Shiro 1.2.4 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/FilterChainManager.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/filter/mgt/DefaultFilterChainManager.html" title="class in org.apache.shiro.web.filter.mgt"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainResolver.html" title="interface in org.apache.shiro.web.filter.mgt"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/shiro/web/filter/mgt/FilterChainManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="FilterChainManager.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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.filter.mgt</FONT>
<BR>
Interface FilterChainManager</H2>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../../org/apache/shiro/web/filter/mgt/DefaultFilterChainManager.html" title="class in org.apache.shiro.web.filter.mgt">DefaultFilterChainManager</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <A HREF="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.34"><B>FilterChainManager</B></A></DL>
</PRE>
<P>
A <code>FilterChainManager</code> manages the creation and modification of <A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet"><CODE>Filter</CODE></A> chains from an available pool
of <A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet"><CODE>Filter</CODE></A> instances.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>1.0</DD>
</DL>
<HR>
<P>
<!-- ========== 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/web/filter/mgt/FilterChainManager.html#addFilter(java.lang.String, javax.servlet.Filter)">addFilter</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/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</A>&nbsp;filter)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a filter to the 'pool' of available filters that can be used when
<A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addToChain(java.lang.String, java.lang.String, java.lang.String)"><CODE>creating filter chains</CODE></A>.</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/filter/mgt/FilterChainManager.html#addFilter(java.lang.String, javax.servlet.Filter, boolean)">addFilter</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/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</A>&nbsp;filter,
boolean&nbsp;init)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a filter to the 'pool' of available filters that can be used when
<A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addToChain(java.lang.String, java.lang.String, java.lang.String)"><CODE>creating filter chains</CODE></A>.</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/filter/mgt/FilterChainManager.html#addToChain(java.lang.String, java.lang.String)">addToChain</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;chainName,
<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;filterName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds (appends) a filter to the filter chain identified by the given <code>chainName</code>.</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/filter/mgt/FilterChainManager.html#addToChain(java.lang.String, java.lang.String, java.lang.String)">addToChain</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;chainName,
<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;filterName,
<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;chainSpecificFilterConfig)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds (appends) a filter to the filter chain identified by the given <code>chainName</code>.</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/filter/mgt/FilterChainManager.html#createChain(java.lang.String, java.lang.String)">createChain</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;chainName,
<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;chainDefinition)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a filter chain for the given <code>chainName</code> with the specified <code>chainDefinition</code>
String.</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/filter/mgt/NamedFilterList.html" title="interface in org.apache.shiro.web.filter.mgt">NamedFilterList</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#getChain(java.lang.String)">getChain</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;chainName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the filter chain identified by the specified <code>chainName</code> or <code>null</code> if there is no chain with
that name.</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/Set.html?is-external=true" title="class or interface in java.util">Set</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;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#getChainNames()">getChainNames</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the names of all configured chains or an empty <code>Set</code> if no chains have been configured.</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/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#getFilters()">getFilters</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the pool of available <code>Filter</code>s managed by this manager, keyed by <code>name</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#hasChains()">hasChains</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if one or more configured chains are available, <code>false</code> if none are configured.</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/javaee/5/docs/api/javax/servlet/FilterChain.html?is-external=true" title="class or interface in javax.servlet">FilterChain</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#proxy(javax.servlet.FilterChain, java.lang.String)">proxy</A></B>(<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/FilterChain.html?is-external=true" title="class or interface in javax.servlet">FilterChain</A>&nbsp;original,
<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;chainName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Proxies the specified <code>original</code> FilterChain with the named chain.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ 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="getFilters()"><!-- --></A><H3>
getFilters</H3>
<PRE>
<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/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</A>&gt; <A HREF="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.41"><B>getFilters</B></A>()</PRE>
<DL>
<DD>Returns the pool of available <code>Filter</code>s managed by this manager, keyed by <code>name</code>.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the pool of available <code>Filter</code>s managed by this manager, keyed by <code>name</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="getChain(java.lang.String)"><!-- --></A><H3>
getChain</H3>
<PRE>
<A HREF="../../../../../../org/apache/shiro/web/filter/mgt/NamedFilterList.html" title="interface in org.apache.shiro.web.filter.mgt">NamedFilterList</A> <A HREF="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.51"><B>getChain</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;chainName)</PRE>
<DL>
<DD>Returns the filter chain identified by the specified <code>chainName</code> or <code>null</code> if there is no chain with
that name.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>chainName</CODE> - the name identifying the filter chain.
<DT><B>Returns:</B><DD>the filter chain identified by the specified <code>chainName</code> or <code>null</code> if there is no chain with
that name.</DL>
</DD>
</DL>
<HR>
<A NAME="hasChains()"><!-- --></A><H3>
hasChains</H3>
<PRE>
boolean <A HREF="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.58"><B>hasChains</B></A>()</PRE>
<DL>
<DD>Returns <code>true</code> if one or more configured chains are available, <code>false</code> if none are configured.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if one or more configured chains are available, <code>false</code> if none are configured.</DL>
</DD>
</DL>
<HR>
<A NAME="getChainNames()"><!-- --></A><H3>
getChainNames</H3>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</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; <A HREF="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.65"><B>getChainNames</B></A>()</PRE>
<DL>
<DD>Returns the names of all configured chains or an empty <code>Set</code> if no chains have been configured.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the names of all configured chains or an empty <code>Set</code> if no chains have been configured.</DL>
</DD>
</DL>
<HR>
<A NAME="proxy(javax.servlet.FilterChain, java.lang.String)"><!-- --></A><H3>
proxy</H3>
<PRE>
<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/FilterChain.html?is-external=true" title="class or interface in javax.servlet">FilterChain</A> <A HREF="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.79"><B>proxy</B></A>(<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/FilterChain.html?is-external=true" title="class or interface in javax.servlet">FilterChain</A>&nbsp;original,
<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;chainName)</PRE>
<DL>
<DD>Proxies the specified <code>original</code> FilterChain with the named chain. The returned
<code>FilterChain</code> instance will first execute the configured named chain and then lastly invoke the given
<code>original</code> chain.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>original</CODE> - the original FilterChain to proxy<DD><CODE>chainName</CODE> - the name of the internal configured filter chain that should 'sit in front' of the specified
original chain.
<DT><B>Returns:</B><DD>a <code>FilterChain</code> instance that will execute the named chain and then finally the
specified <code>original</code> FilterChain instance.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if there is no configured chain with the given <code>chainName</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="addFilter(java.lang.String, javax.servlet.Filter)"><!-- --></A><H3>
addFilter</H3>
<PRE>
void <A HREF="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.91"><B>addFilter</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/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</A>&nbsp;filter)</PRE>
<DL>
<DD>Adds a filter to the 'pool' of available filters that can be used when
<A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addToChain(java.lang.String, java.lang.String, java.lang.String)"><CODE>creating filter chains</CODE></A>.
<p/>
Calling this method is effectively the same as calling
<code><A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addFilter(java.lang.String, javax.servlet.Filter, boolean)"><CODE>addFilter</CODE></A>(name, filter, <b>false</b>);</code>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name to assign to the filter, used to reference the filter in chain definitions<DD><CODE>filter</CODE> - the filter to initialize and then add to the pool of available filters that can be used</DL>
</DD>
</DL>
<HR>
<A NAME="addFilter(java.lang.String, javax.servlet.Filter, boolean)"><!-- --></A><H3>
addFilter</H3>
<PRE>
void <A HREF="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.102"><B>addFilter</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/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</A>&nbsp;filter,
boolean&nbsp;init)</PRE>
<DL>
<DD>Adds a filter to the 'pool' of available filters that can be used when
<A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addToChain(java.lang.String, java.lang.String, java.lang.String)"><CODE>creating filter chains</CODE></A>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name to assign to the filter, used to reference the filter in chain definitions<DD><CODE>filter</CODE> - the filter to assign to the filter pool<DD><CODE>init</CODE> - whether or not the <code>Filter</code> should be
<A HREF="http://java.sun.com/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true#init(javax.servlet.FilterConfig)" title="class or interface in javax.servlet"><CODE>initialized</CODE></A> first before being added to the pool.</DL>
</DD>
</DL>
<HR>
<A NAME="createChain(java.lang.String, java.lang.String)"><!-- --></A><H3>
createChain</H3>
<PRE>
void <A HREF="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.165"><B>createChain</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;chainName,
<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;chainDefinition)</PRE>
<DL>
<DD>Creates a filter chain for the given <code>chainName</code> with the specified <code>chainDefinition</code>
String.
<h3>Conventional Use</h3>
Because the <code>FilterChainManager</code> interface does not impose any restrictions on filter chain names,
(it expects only Strings), a convenient convention is to make the chain name an actual URL path expression
(such as an <A HREF="../../../../../../org/apache/shiro/util/AntPathMatcher.html" title="class in org.apache.shiro.util"><CODE>Ant path expression</CODE></A>). For example:
<p/>
<code>createChain(<b><em>path_expression</em></b>, <em>path_specific_filter_chain_definition</em>);</code>
This convention can be used by a <A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainResolver.html" title="interface in org.apache.shiro.web.filter.mgt"><CODE>FilterChainResolver</CODE></A> to inspect request URL paths
against the chain name (path) and, if a match is found, return the corresponding chain for runtime filtering.
<h3>Chain Definition Format</h3>
The <code>chainDefinition</code> method argument is expected to conform to the following format:
<pre>
filter1[optional_config1], filter2[optional_config2], ..., filterN[optional_configN]</pre>
where
<ol>
<li><code>filterN</code> is the name of a filter previously
<A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addFilter(java.lang.String, javax.servlet.Filter)"><CODE>registered</CODE></A> with the manager, and</li>
<li><code>[optional_configN]</code> is an optional bracketed string that has meaning for that particular filter for
<em>this particular chain</em></li>
</ol>
If the filter does not need specific config for that chain name/URL path,
you may discard the brackets - that is, <code>filterN[]</code> just becomes <code>filterN</code>.
<p/>
And because this method does create a chain, remember that order matters! The comma-delimited filter tokens in
the <code>chainDefinition</code> specify the chain's execution order.
<h3>Examples</h3>
<pre>/account/** = authcBasic</pre>
This example says &quot;Create a filter named '<code>/account/**</code>' consisting of only the '<code>authcBasic</code>'
filter&quot;. Also because the <code>authcBasic</code> filter does not need any path-specific
config, it doesn't have any config brackets <code>[]</code>.
<p/>
<pre>/remoting/** = authcBasic, roles[b2bClient], perms[&quot;remote:invoke:wan,lan&quot;]</pre>
This example by contrast uses the 'roles' and 'perms' filters which <em>do</em> use bracket notation. This
definition says:
<p/>
Construct a filter chain named '<code>/remoting/**</code>' which
<ol>
<li>ensures the user is first authenticated (<code>authcBasic</code>) then</li>
<li>ensures that user has the <code>b2bClient</code> role, and then finally</li>
<li>ensures that they have the <code>remote:invoke:lan,wan</code> permission.</li>
</ol>
<p/>
<b>Note</b>: because elements within brackets [ ] can be comma-delimited themselves, you must quote the
internal bracket definition if commas are needed (the above example has 'lan,wan'). If we didn't do that, the
parser would interpret the chain definition as four tokens:
<ol>
<li>authcBasic</li>
<li>roles[b2bclient]</li>
<li>perms[remote:invoke:lan</li>
<li>wan]</li>
</ol>
which is obviously incorrect. So remember to use quotes if your internal bracket definitions need to use commas.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>chainName</CODE> - the name to associate with the chain, conventionally a URL path pattern.<DD><CODE>chainDefinition</CODE> - the string-formatted chain definition used to construct an actual
<A HREF="../../../../../../org/apache/shiro/web/filter/mgt/NamedFilterList.html" title="interface in org.apache.shiro.web.filter.mgt"><CODE>NamedFilterList</CODE></A> chain instance.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainResolver.html" title="interface in org.apache.shiro.web.filter.mgt"><CODE>FilterChainResolver</CODE></A>,
<A HREF="../../../../../../org/apache/shiro/util/AntPathMatcher.html" title="class in org.apache.shiro.util"><CODE>AntPathMatcher</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="addToChain(java.lang.String, java.lang.String)"><!-- --></A><H3>
addToChain</H3>
<PRE>
void <A HREF="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.176"><B>addToChain</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;chainName,
<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;filterName)</PRE>
<DL>
<DD>Adds (appends) a filter to the filter chain identified by the given <code>chainName</code>. If there is no chain
with the given name, a new one is created and the filter will be the first in the chain.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>chainName</CODE> - the name of the chain where the filter will be appended.<DD><CODE>filterName</CODE> - the name of the <A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addFilter(java.lang.String, javax.servlet.Filter)"><CODE>registered</CODE></A> filter to add to the chain.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if there is not a <A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addFilter(java.lang.String, javax.servlet.Filter)"><CODE>registered</CODE></A>
filter under the given <code>filterName</code></DL>
</DD>
</DL>
<HR>
<A NAME="addToChain(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
addToChain</H3>
<PRE>
void <A HREF="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.197"><B>addToChain</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;chainName,
<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;filterName,
<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;chainSpecificFilterConfig)
throws <A HREF="../../../../../../org/apache/shiro/config/ConfigurationException.html" title="class in org.apache.shiro.config">ConfigurationException</A></PRE>
<DL>
<DD>Adds (appends) a filter to the filter chain identified by the given <code>chainName</code>. If there is no chain
with the given name, a new one is created and the filter will be the first in the chain.
<p/>
Note that the final argument expects the associated filter to be an instance of
a <A HREF="../../../../../../org/apache/shiro/web/filter/PathConfigProcessor.html" title="interface in org.apache.shiro.web.filter"><CODE>PathConfigProcessor</CODE></A> to accept per-chain configuration.
If it is not, a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><CODE>IllegalArgumentException</CODE></A> will be thrown.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>chainName</CODE> - the name of the chain where the filter will be appended.<DD><CODE>filterName</CODE> - the name of the <A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addFilter(java.lang.String, javax.servlet.Filter)"><CODE>registered</CODE></A> filter to add to the chain.<DD><CODE>chainSpecificFilterConfig</CODE> - the filter-specific configuration that should be applied for only the specified
filter chain.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if there is not a <A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addFilter(java.lang.String, javax.servlet.Filter)"><CODE>registered</CODE></A>
filter under the given <code>filterName</code>
<DD><CODE><A HREF="../../../../../../org/apache/shiro/config/ConfigurationException.html" title="class in org.apache.shiro.config">ConfigurationException</A></CODE> - if the filter is not capable of accepting <code>chainSpecificFilterConfig</code>
(usually such filters implement the
<A HREF="../../../../../../org/apache/shiro/web/filter/PathConfigProcessor.html" title="interface in org.apache.shiro.web.filter"><CODE>PathConfigProcessor</CODE></A>
interface).</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/FilterChainManager.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/filter/mgt/DefaultFilterChainManager.html" title="class in org.apache.shiro.web.filter.mgt"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainResolver.html" title="interface in org.apache.shiro.web.filter.mgt"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/shiro/web/filter/mgt/FilterChainManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="FilterChainManager.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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-2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>