blob: 58166e5f936bd6acebd3600c1e196bd5248a4472 [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:16:46 EST 2014 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
AdviceFilter (Apache Shiro :: Web 1.2.3 API)
</TITLE>
<META NAME="date" CONTENT="2014-02-25">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="AdviceFilter (Apache Shiro :: Web 1.2.3 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&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/AdviceFilter.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/servlet/AbstractShiroFilter.html" title="class in org.apache.shiro.web.servlet"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/shiro/web/servlet/Cookie.html" title="interface in org.apache.shiro.web.servlet"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/shiro/web/servlet/AdviceFilter.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="AdviceFilter.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="#fields_inherited_from_class_org.apache.shiro.web.servlet.OncePerRequestFilter">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;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.shiro.web.servlet</FONT>
<BR>
Class AdviceFilter</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.ServletContextSupport</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.AbstractFilter</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/shiro/web/servlet/NameableFilter.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.NameableFilter</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.OncePerRequestFilter</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.shiro.web.servlet.AdviceFilter</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>javax.servlet.Filter, org.apache.shiro.util.Nameable</DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/shiro/web/filter/authc/LogoutFilter.html" title="class in org.apache.shiro.web.filter.authc">LogoutFilter</A>, <A HREF="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html" title="class in org.apache.shiro.web.filter">PathMatchingFilter</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public abstract class <B>AdviceFilter</B><DT>extends <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html" title="class in org.apache.shiro.web.servlet">OncePerRequestFilter</A></DL>
</PRE>
<P>
A Servlet Filter that enables AOP-style &quot;around&quot; advice for a ServletRequest via
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#preHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>preHandle</CODE></A>,
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#postHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>postHandle</CODE></A>,
and <A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#afterCompletion(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.Exception)"><CODE>afterCompletion</CODE></A>
hooks.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>0.9</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>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.apache.shiro.web.servlet.OncePerRequestFilter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.apache.shiro.web.servlet.<A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html" title="class in org.apache.shiro.web.servlet">OncePerRequestFilter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#ALREADY_FILTERED_SUFFIX">ALREADY_FILTERED_SUFFIX</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.apache.shiro.web.servlet.AbstractFilter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.apache.shiro.web.servlet.<A HREF="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html" title="class in org.apache.shiro.web.servlet">AbstractFilter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#filterConfig">filterConfig</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#AdviceFilter()">AdviceFilter</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#afterCompletion(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.Exception)">afterCompletion</A></B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>&nbsp;exception)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called in all cases in a <code>finally</code> block even if <A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#preHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>preHandle</CODE></A> returns
<code>false</code> or if an exception is thrown during filter chain processing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#cleanup(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.Exception)">cleanup</A></B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>&nbsp;existing)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Executes cleanup logic in the <code>finally</code> code block in the
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><CODE>doFilterInternal</CODE></A>
implementation.</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/servlet/AdviceFilter.html#doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)">doFilterInternal</A></B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response,
javax.servlet.FilterChain&nbsp;chain)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Actually implements the chain execution logic, utilizing
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#preHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>pre</CODE></A>,
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#postHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>post</CODE></A>, and
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#afterCompletion(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.Exception)"><CODE>after</CODE></A>
advice hooks.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#executeChain(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)">executeChain</A></B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response,
javax.servlet.FilterChain&nbsp;chain)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Actually executes the specified filter chain by calling <code>chain.doFilter(request,response);</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#postHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)">postHandle</A></B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allows 'post' advice logic to be called, but only if no exception occurs during filter chain execution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#preHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)">preHandle</A></B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if the filter chain should be allowed to continue, <code>false</code> otherwise.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.shiro.web.servlet.OncePerRequestFilter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.shiro.web.servlet.<A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html" title="class in org.apache.shiro.web.servlet">OncePerRequestFilter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)">doFilter</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#getAlreadyFilteredAttributeName()">getAlreadyFilteredAttributeName</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled()">isEnabled</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)">isEnabled</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#setEnabled(boolean)">setEnabled</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#shouldNotFilter(javax.servlet.ServletRequest)">shouldNotFilter</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.shiro.web.servlet.NameableFilter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.shiro.web.servlet.<A HREF="../../../../../org/apache/shiro/web/servlet/NameableFilter.html" title="class in org.apache.shiro.web.servlet">NameableFilter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/web/servlet/NameableFilter.html#getName()">getName</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/NameableFilter.html#setName(java.lang.String)">setName</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/NameableFilter.html#toStringBuilder()">toStringBuilder</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.shiro.web.servlet.AbstractFilter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.shiro.web.servlet.<A HREF="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html" title="class in org.apache.shiro.web.servlet">AbstractFilter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#destroy()">destroy</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#getFilterConfig()">getFilterConfig</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#getInitParam(java.lang.String)">getInitParam</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#init(javax.servlet.FilterConfig)">init</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#onFilterConfigSet()">onFilterConfigSet</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#setFilterConfig(javax.servlet.FilterConfig)">setFilterConfig</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.shiro.web.servlet.ServletContextSupport"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.shiro.web.servlet.<A HREF="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html" title="class in org.apache.shiro.web.servlet">ServletContextSupport</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#getContextAttribute(java.lang.String)">getContextAttribute</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#getContextInitParam(java.lang.String)">getContextInitParam</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#getServletContext()">getServletContext</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#removeContextAttribute(java.lang.String)">removeContextAttribute</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#setContextAttribute(java.lang.String, java.lang.Object)">setContextAttribute</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#setServletContext(javax.servlet.ServletContext)">setServletContext</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#toString()">toString</A></CODE></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/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= 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="AdviceFilter()"><!-- --></A><H3>
AdviceFilter</H3>
<PRE>
public <B>AdviceFilter</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="preHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><!-- --></A><H3>
preHandle</H3>
<PRE>
protected boolean <B>preHandle</B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response)
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Returns <code>true</code> if the filter chain should be allowed to continue, <code>false</code> otherwise.
It is called before the chain is actually consulted/executed.
<p/>
The default implementation returns <code>true</code> always and exists as a template method for subclasses.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the incoming ServletRequest<DD><CODE>response</CODE> - the outgoing ServletResponse
<DT><B>Returns:</B><DD><code>true</code> if the filter chain should be allowed to continue, <code>false</code> otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE> - if there is any error.</DL>
</DD>
</DL>
<HR>
<A NAME="postHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><!-- --></A><H3>
postHandle</H3>
<PRE>
protected void <B>postHandle</B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response)
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Allows 'post' advice logic to be called, but only if no exception occurs during filter chain execution. That
is, if <A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#executeChain(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><CODE>executeChain</CODE></A> throws an exception, this method will never be called. Be aware of
this when implementing logic. Most resource 'cleanup' behavior is often done in the
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#afterCompletion(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.Exception)"><CODE>afterCompletion(request,response,exception)</CODE></A>
implementation, which is guaranteed to be called for every request, even when the chain processing throws
an Exception.
<p/>
The default implementation does nothing (no-op) and exists as a template method for subclasses.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the incoming ServletRequest<DD><CODE>response</CODE> - the outgoing ServletResponse
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE> - if an error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="afterCompletion(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.Exception)"><!-- --></A><H3>
afterCompletion</H3>
<PRE>
public void <B>afterCompletion</B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>&nbsp;exception)
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Called in all cases in a <code>finally</code> block even if <A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#preHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>preHandle</CODE></A> returns
<code>false</code> or if an exception is thrown during filter chain processing. Can be used for resource
cleanup if so desired.
<p/>
The default implementation does nothing (no-op) and exists as a template method for subclasses.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the incoming ServletRequest<DD><CODE>response</CODE> - the outgoing ServletResponse<DD><CODE>exception</CODE> - any exception thrown during <A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#preHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>preHandle</CODE></A>, <A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#executeChain(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><CODE>executeChain</CODE></A>,
or <A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#postHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>postHandle</CODE></A> execution, or <code>null</code> if no exception was thrown
(i.e. the chain processed successfully).
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE> - if an error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="executeChain(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><!-- --></A><H3>
executeChain</H3>
<PRE>
protected void <B>executeChain</B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response,
javax.servlet.FilterChain&nbsp;chain)
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Actually executes the specified filter chain by calling <code>chain.doFilter(request,response);</code>.
<p/>
Can be overridden by subclasses for custom logic.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the incoming ServletRequest<DD><CODE>response</CODE> - the outgoing ServletResponse<DD><CODE>chain</CODE> - the filter chain to execute
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE> - if there is any error executing the chain.</DL>
</DD>
</DL>
<HR>
<A NAME="doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><!-- --></A><H3>
doFilterInternal</H3>
<PRE>
public void <B>doFilterInternal</B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response,
javax.servlet.FilterChain&nbsp;chain)
throws javax.servlet.ServletException,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Actually implements the chain execution logic, utilizing
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#preHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>pre</CODE></A>,
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#postHandle(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>post</CODE></A>, and
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#afterCompletion(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.Exception)"><CODE>after</CODE></A>
advice hooks.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)">doFilterInternal</A></CODE> in class <CODE><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html" title="class in org.apache.shiro.web.servlet">OncePerRequestFilter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the incoming ServletRequest<DD><CODE>response</CODE> - the outgoing ServletResponse<DD><CODE>chain</CODE> - the filter chain to execute
<DT><B>Throws:</B>
<DD><CODE>javax.servlet.ServletException</CODE> - if a servlet-related error occurs
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if an IO error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="cleanup(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.Exception)"><!-- --></A><H3>
cleanup</H3>
<PRE>
protected void <B>cleanup</B>(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>&nbsp;existing)
throws javax.servlet.ServletException,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Executes cleanup logic in the <code>finally</code> code block in the
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><CODE>doFilterInternal</CODE></A>
implementation.
<p/>
This implementation specifically calls
<A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#afterCompletion(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.Exception)"><CODE>afterCompletion</CODE></A>
as well as handles any exceptions properly.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the incoming <code>ServletRequest</code><DD><CODE>response</CODE> - the outgoing <code>ServletResponse</code><DD><CODE>existing</CODE> - any exception that might have occurred while executing the <code>FilterChain</code> or
pre or post advice, or <code>null</code> if the pre/chain/post execution did not throw an <code>Exception</code>.
<DT><B>Throws:</B>
<DD><CODE>javax.servlet.ServletException</CODE> - if any exception other than an <code>IOException</code> is thrown.
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if the pre/chain/post execution throw an <code>IOException</code></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/AdviceFilter.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/servlet/AbstractShiroFilter.html" title="class in org.apache.shiro.web.servlet"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/shiro/web/servlet/Cookie.html" title="interface in org.apache.shiro.web.servlet"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/shiro/web/servlet/AdviceFilter.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="AdviceFilter.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="#fields_inherited_from_class_org.apache.shiro.web.servlet.OncePerRequestFilter">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;FIELD&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>