| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="fr"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_201) on Sat Feb 22 18:53:56 CET 2020 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>FilterChainManager (Apache Shiro :: Web 1.5.1 API)</title> |
| <meta name="date" content="2020-02-22"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="FilterChainManager (Apache Shiro :: Web 1.5.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/FilterChainManager.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/shiro/web/filter/mgt/DefaultFilterChainManager.html" title="class in org.apache.shiro.web.filter.mgt"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainResolver.html" title="interface in org.apache.shiro.web.filter.mgt"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/shiro/web/filter/mgt/FilterChainManager.html" target="_top">Frames</a></li> |
| <li><a href="FilterChainManager.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.shiro.web.filter.mgt</div> |
| <h2 title="Interface FilterChainManager" class="title">Interface FilterChainManager</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <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> |
| <br> |
| <pre>public interface <a href="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.34">FilterChainManager</a></pre> |
| <div class="block">A <code>FilterChainManager</code> manages the creation and modification of <a href="https://docs.oracle.com/javaee/5/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="https://docs.oracle.com/javaee/5/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet"><code>Filter</code></a> instances.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addFilter-java.lang.String-javax.servlet.Filter-">addFilter</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</a> filter)</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addFilter-java.lang.String-javax.servlet.Filter-boolean-">addFilter</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</a> filter, |
| boolean init)</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addToChain-java.lang.String-java.lang.String-">addToChain</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainName, |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> filterName)</code> |
| <div class="block">Adds (appends) a filter to the filter chain identified by the given <code>chainName</code>.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#addToChain-java.lang.String-java.lang.String-java.lang.String-">addToChain</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainName, |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> filterName, |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainSpecificFilterConfig)</code> |
| <div class="block">Adds (appends) a filter to the filter chain identified by the given <code>chainName</code>.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#createChain-java.lang.String-java.lang.String-">createChain</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainName, |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainDefinition)</code> |
| <div class="block">Creates a filter chain for the given <code>chainName</code> with the specified <code>chainDefinition</code> |
| String.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/shiro/web/filter/mgt/NamedFilterList.html" title="interface in org.apache.shiro.web.filter.mgt">NamedFilterList</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#getChain-java.lang.String-">getChain</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainName)</code> |
| <div class="block">Returns the filter chain identified by the specified <code>chainName</code> or <code>null</code> if there is no chain with |
| that name.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#getChainNames--">getChainNames</a></span>()</code> |
| <div class="block">Returns the names of all configured chains or an empty <code>Set</code> if no chains have been configured.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#getFilters--">getFilters</a></span>()</code> |
| <div class="block">Returns the pool of available <code>Filter</code>s managed by this manager, keyed by <code>name</code>.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#hasChains--">hasChains</a></span>()</code> |
| <div class="block">Returns <code>true</code> if one or more configured chains are available, <code>false</code> if none are configured.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javaee/5/api/javax/servlet/FilterChain.html?is-external=true" title="class or interface in javax.servlet">FilterChain</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainManager.html#proxy-javax.servlet.FilterChain-java.lang.String-">proxy</a></span>(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/FilterChain.html?is-external=true" title="class or interface in javax.servlet">FilterChain</a> original, |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainName)</code> |
| <div class="block">Proxies the specified <code>original</code> FilterChain with the named chain.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getFilters--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFilters</h4> |
| <pre><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</a>> <a href="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.41">getFilters</a>()</pre> |
| <div class="block">Returns the pool of available <code>Filter</code>s managed by this manager, keyed by <code>name</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the pool of available <code>Filter</code>s managed by this manager, keyed by <code>name</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getChain-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getChain</h4> |
| <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">getChain</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainName)</pre> |
| <div class="block">Returns the filter chain identified by the specified <code>chainName</code> or <code>null</code> if there is no chain with |
| that name.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>chainName</code> - the name identifying the filter chain.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the filter chain identified by the specified <code>chainName</code> or <code>null</code> if there is no chain with |
| that name.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hasChains--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasChains</h4> |
| <pre>boolean <a href="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.58">hasChains</a>()</pre> |
| <div class="block">Returns <code>true</code> if one or more configured chains are available, <code>false</code> if none are configured.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if one or more configured chains are available, <code>false</code> if none are configured.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getChainNames--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getChainNames</h4> |
| <pre><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> <a href="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.65">getChainNames</a>()</pre> |
| <div class="block">Returns the names of all configured chains or an empty <code>Set</code> if no chains have been configured.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the names of all configured chains or an empty <code>Set</code> if no chains have been configured.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="proxy-javax.servlet.FilterChain-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>proxy</h4> |
| <pre><a href="https://docs.oracle.com/javaee/5/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">proxy</a>(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/FilterChain.html?is-external=true" title="class or interface in javax.servlet">FilterChain</a> original, |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainName)</pre> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>original</code> - the original FilterChain to proxy</dd> |
| <dd><code>chainName</code> - the name of the internal configured filter chain that should 'sit in front' of the specified |
| original chain.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>FilterChain</code> instance that will execute the named chain and then finally the |
| specified <code>original</code> FilterChain instance.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.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>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addFilter-java.lang.String-javax.servlet.Filter-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addFilter</h4> |
| <pre>void <a href="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.91">addFilter</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</a> filter)</pre> |
| <div class="block">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></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name to assign to the filter, used to reference the filter in chain definitions</dd> |
| <dd><code>filter</code> - the filter to initialize and then add to the pool of available filters that can be used</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addFilter-java.lang.String-javax.servlet.Filter-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addFilter</h4> |
| <pre>void <a href="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.102">addFilter</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</a> filter, |
| boolean init)</pre> |
| <div class="block">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>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name to assign to the filter, used to reference the filter in chain definitions</dd> |
| <dd><code>filter</code> - the filter to assign to the filter pool</dd> |
| <dd><code>init</code> - whether or not the <code>Filter</code> should be |
| <a href="https://docs.oracle.com/javaee/5/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.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createChain-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createChain</h4> |
| <pre>void <a href="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.165">createChain</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainName, |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainDefinition)</pre> |
| <div class="block">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 <code>Ant path expression</code>). 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 "Create a filter named '<code>/account/**</code>' consisting of only the '<code>authcBasic</code>' |
| filter". 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["remote:invoke:wan,lan"]</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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>chainName</code> - the name to associate with the chain, conventionally a URL path pattern.</dd> |
| <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.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainResolver.html" title="interface in org.apache.shiro.web.filter.mgt"><code>FilterChainResolver</code></a>, |
| <code>AntPathMatcher</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addToChain-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addToChain</h4> |
| <pre>void <a href="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.176">addToChain</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainName, |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> filterName)</pre> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>chainName</code> - the name of the chain where the filter will be appended.</dd> |
| <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> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.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> |
| </dl> |
| </li> |
| </ul> |
| <a name="addToChain-java.lang.String-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>addToChain</h4> |
| <pre>void <a href="../../../../../../src-html/org/apache/shiro/web/filter/mgt/FilterChainManager.html#line.197">addToChain</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainName, |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> filterName, |
| <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> chainSpecificFilterConfig) |
| throws org.apache.shiro.config.ConfigurationException</pre> |
| <div class="block">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="https://docs.oracle.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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>chainName</code> - the name of the chain where the filter will be appended.</dd> |
| <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> |
| <dd><code>chainSpecificFilterConfig</code> - the filter-specific configuration that should be applied for only the specified |
| filter chain.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.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> |
| <dd><code>org.apache.shiro.config.ConfigurationException</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).</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/FilterChainManager.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/shiro/web/filter/mgt/DefaultFilterChainManager.html" title="class in org.apache.shiro.web.filter.mgt"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/shiro/web/filter/mgt/FilterChainResolver.html" title="interface in org.apache.shiro.web.filter.mgt"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/shiro/web/filter/mgt/FilterChainManager.html" target="_top">Frames</a></li> |
| <li><a href="FilterChainManager.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2004–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |