| <!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> |
| OncePerRequestFilter (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="OncePerRequestFilter (Apache Shiro :: Web 1.2.3 API)"; |
| } |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| <HR> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/OncePerRequestFilter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../org/apache/shiro/web/servlet/NameableFilter.html" title="class in org.apache.shiro.web.servlet"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/shiro/web/servlet/ProxiedFilterChain.html" title="class 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/OncePerRequestFilter.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="OncePerRequestFilter.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.shiro.web.servlet</FONT> |
| <BR> |
| Class OncePerRequestFilter</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 "><B>org.apache.shiro.web.servlet.OncePerRequestFilter</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/servlet/AbstractShiroFilter.html" title="class in org.apache.shiro.web.servlet">AbstractShiroFilter</A>, <A HREF="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html" title="class in org.apache.shiro.web.servlet">AdviceFilter</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT><PRE>public abstract class <B>OncePerRequestFilter</B><DT>extends <A HREF="../../../../../org/apache/shiro/web/servlet/NameableFilter.html" title="class in org.apache.shiro.web.servlet">NameableFilter</A></DL> |
| </PRE> |
| |
| <P> |
| Filter base class that guarantees to be just executed once per request, |
| on any servlet container. It provides a <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><CODE>doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)</CODE></A> |
| method with HttpServletRequest and HttpServletResponse arguments. |
| <p/> |
| The <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#getAlreadyFilteredAttributeName()"><CODE>getAlreadyFilteredAttributeName()</CODE></A> method determines how |
| to identify that a request is already filtered. The default implementation |
| is based on the configured name of the concrete filter instance. |
| <h3>Controlling filter execution</h3> |
| 1.2 introduced the <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</CODE></A> method and |
| <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled()"><CODE>isEnabled()</CODE></A> property to allow explicit controll over whether the filter executes (or allows passthrough) |
| for any given request. |
| <p/> |
| <b>NOTE</b> This class was initially borrowed from the Spring framework but has continued modifications. |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Since:</B></DT> |
| <DD>0.1</DD> |
| </DL> |
| <HR> |
| |
| <P> |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#ALREADY_FILTERED_SUFFIX">ALREADY_FILTERED_SUFFIX</A></B></CODE> |
| |
| <BR> |
| Suffix that gets appended to the filter name for the "already filtered" request attribute.</TD> |
| </TR> |
| </TABLE> |
| <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> |
| |
| <!-- ======== 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/OncePerRequestFilter.html#OncePerRequestFilter()">OncePerRequestFilter</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)">doFilter</A></B>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| javax.servlet.FilterChain filterChain)</CODE> |
| |
| <BR> |
| This <code>doFilter</code> implementation stores a request attribute for |
| "already filtered", proceeding without filtering again if the |
| attribute is already there.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected abstract void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)">doFilterInternal</A></B>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| javax.servlet.FilterChain chain)</CODE> |
| |
| <BR> |
| Same contract as for |
| <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><CODE>doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)</CODE></A>, |
| but guaranteed to be invoked only once per request.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#getAlreadyFilteredAttributeName()">getAlreadyFilteredAttributeName</A></B>()</CODE> |
| |
| <BR> |
| Return name of the request attribute that identifies that a request has already been filtered.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled()">isEnabled</A></B>()</CODE> |
| |
| <BR> |
| Returns <code>true</code> if this filter should <em>generally</em><b>*</b> execute for any request, |
| <code>false</code> if it should let the request/response pass through immediately to the next |
| element in the <CODE>FilterChain</CODE>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)">isEnabled</A></B>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response)</CODE> |
| |
| <BR> |
| Returns <code>true</code> if this filter should filter the specified request, <code>false</code> if it should let the |
| request/response pass through immediately to the next element in the <code>FilterChain</code>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#setEnabled(boolean)">setEnabled</A></B>(boolean enabled)</CODE> |
| |
| <BR> |
| Sets whether or not this filter <em>generally</em> executes for any request.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#shouldNotFilter(javax.servlet.ServletRequest)">shouldNotFilter</A></B>(javax.servlet.ServletRequest request)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>in favor of overriding <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</CODE></A> |
| for custom behavior. This method will be removed in Shiro 2.0.</I></TD> |
| </TR> |
| </TABLE> |
| <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> |
| <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> |
| <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> |
| <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> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| <A NAME="field_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Field Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="ALREADY_FILTERED_SUFFIX"><!-- --></A><H3> |
| ALREADY_FILTERED_SUFFIX</H3> |
| <PRE> |
| public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>ALREADY_FILTERED_SUFFIX</B></PRE> |
| <DL> |
| <DD>Suffix that gets appended to the filter name for the "already filtered" request attribute. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#getAlreadyFilteredAttributeName()"><CODE>getAlreadyFilteredAttributeName()</CODE></A>, |
| <A HREF="../../../../../constant-values.html#org.apache.shiro.web.servlet.OncePerRequestFilter.ALREADY_FILTERED_SUFFIX">Constant Field Values</A></DL> |
| </DL> |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Constructor Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="OncePerRequestFilter()"><!-- --></A><H3> |
| OncePerRequestFilter</H3> |
| <PRE> |
| public <B>OncePerRequestFilter</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="isEnabled()"><!-- --></A><H3> |
| isEnabled</H3> |
| <PRE> |
| public boolean <B>isEnabled</B>()</PRE> |
| <DL> |
| <DD>Returns <code>true</code> if this filter should <em>generally</em><b>*</b> execute for any request, |
| <code>false</code> if it should let the request/response pass through immediately to the next |
| element in the <CODE>FilterChain</CODE>. The default value is <code>true</code>, as most filters would inherently need |
| to execute when configured. |
| <p/> |
| <b>*</b> This configuration property is for general configuration for any request that comes through |
| the filter. The |
| <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>isEnabled(request,response)</CODE></A> |
| method actually determines whether or not if the filter is enabled based on the current request. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD><code>true</code> if this filter should <em>generally</em> execute, <code>false</code> if it should let the |
| request/response pass through immediately to the next element in the <CODE>FilterChain</CODE>.<DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setEnabled(boolean)"><!-- --></A><H3> |
| setEnabled</H3> |
| <PRE> |
| public void <B>setEnabled</B>(boolean enabled)</PRE> |
| <DL> |
| <DD>Sets whether or not this filter <em>generally</em> executes for any request. See the |
| <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled()"><CODE>isEnabled()</CODE></A> JavaDoc as to what <em>general</em> execution means. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>enabled</CODE> - whether or not this filter <em>generally</em> executes.<DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><!-- --></A><H3> |
| doFilter</H3> |
| <PRE> |
| public final void <B>doFilter</B>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| javax.servlet.FilterChain filterChain) |
| 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>This <code>doFilter</code> implementation stores a request attribute for |
| "already filtered", proceeding without filtering again if the |
| attribute is already there. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Throws:</B> |
| <DD><CODE>javax.servlet.ServletException</CODE> |
| <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><DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#getAlreadyFilteredAttributeName()"><CODE>getAlreadyFilteredAttributeName()</CODE></A>, |
| <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#shouldNotFilter(javax.servlet.ServletRequest)"><CODE>shouldNotFilter(javax.servlet.ServletRequest)</CODE></A>, |
| <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><CODE>doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><!-- --></A><H3> |
| isEnabled</H3> |
| <PRE> |
| protected boolean <B>isEnabled</B>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response) |
| 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>Returns <code>true</code> if this filter should filter the specified request, <code>false</code> if it should let the |
| request/response pass through immediately to the next element in the <code>FilterChain</code>. |
| <p/> |
| This default implementation merely returns the value of <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled()"><CODE>isEnabled()</CODE></A>, which is |
| <code>true</code> by default (to ensure the filter always executes by default), but it can be overridden by |
| subclasses for request-specific behavior if necessary. For example, a filter could be enabled or disabled |
| based on the request path being accessed. |
| <p/> |
| <b>Helpful Hint:</b> if your subclass extends <A HREF="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html" title="class in org.apache.shiro.web.filter"><CODE>PathMatchingFilter</CODE></A>, |
| you may wish to instead override the |
| <A HREF="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.Object)"><CODE>PathMatchingFilter.isEnabled(request,response,path,pathSpecificConfig)</CODE></A> |
| method if you want to make your enable/disable decision based on any path-specific configuration. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>request</CODE> - the incoming servlet request<DD><CODE>response</CODE> - the outbound servlet response |
| <DT><B>Returns:</B><DD><code>true</code> if this filter should filter the specified request, <code>false</code> if it should let the |
| request/response pass through immediately to the next element in the <code>FilterChain</code>. |
| <DT><B>Throws:</B> |
| <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> - in the case of any IO error |
| <DD><CODE>javax.servlet.ServletException</CODE> - in the case of any error<DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.Object)"><CODE>PathMatchingFilter.isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse, String, Object)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getAlreadyFilteredAttributeName()"><!-- --></A><H3> |
| getAlreadyFilteredAttributeName</H3> |
| <PRE> |
| protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getAlreadyFilteredAttributeName</B>()</PRE> |
| <DL> |
| <DD>Return name of the request attribute that identifies that a request has already been filtered. |
| <p/> |
| The default implementation takes the configured <A HREF="../../../../../org/apache/shiro/web/servlet/NameableFilter.html#getName()"><CODE>name</CODE></A> and appends "<code>.FILTERED</code>". |
| If the filter is not fully initialized, it falls back to the implementation's class name. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the name of the request attribute that identifies that a request has already been filtered.<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/web/servlet/NameableFilter.html#getName()"><CODE>NameableFilter.getName()</CODE></A>, |
| <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#ALREADY_FILTERED_SUFFIX"><CODE>ALREADY_FILTERED_SUFFIX</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="shouldNotFilter(javax.servlet.ServletRequest)"><!-- --></A><H3> |
| shouldNotFilter</H3> |
| <PRE> |
| <FONT SIZE="-1"><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A> |
| </FONT>protected boolean <B>shouldNotFilter</B>(javax.servlet.ServletRequest request) |
| throws javax.servlet.ServletException</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>in favor of overriding <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)"><CODE>isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</CODE></A> |
| for custom behavior. This method will be removed in Shiro 2.0.</I> |
| <P> |
| <DD>Can be overridden in subclasses for custom filtering control, |
| returning <code>true</code> to avoid filtering of the given request. |
| <p>The default implementation always returns <code>false</code>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>request</CODE> - current HTTP request |
| <DT><B>Returns:</B><DD>whether the given request should <i>not</i> be filtered |
| <DT><B>Throws:</B> |
| <DD><CODE>javax.servlet.ServletException</CODE> - in case of errors</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><!-- --></A><H3> |
| doFilterInternal</H3> |
| <PRE> |
| protected abstract void <B>doFilterInternal</B>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| javax.servlet.FilterChain 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>Same contract as for |
| <A HREF="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)"><CODE>doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)</CODE></A>, |
| but guaranteed to be invoked only once per request. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>request</CODE> - incoming <code>ServletRequest</code><DD><CODE>response</CODE> - outgoing <code>ServletResponse</code><DD><CODE>chain</CODE> - the <code>FilterChain</code> to execute |
| <DT><B>Throws:</B> |
| <DD><CODE>javax.servlet.ServletException</CODE> - if there is a problem processing the request |
| <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 there is an I/O problem processing the request</DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/OncePerRequestFilter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../org/apache/shiro/web/servlet/NameableFilter.html" title="class in org.apache.shiro.web.servlet"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/shiro/web/servlet/ProxiedFilterChain.html" title="class 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/OncePerRequestFilter.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="OncePerRequestFilter.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 2004-2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |