com.atlassian.plugin.servlet.filter
Class IteratingFilterChain

java.lang.Object
  extended by com.atlassian.plugin.servlet.filter.IteratingFilterChain
All Implemented Interfaces:
javax.servlet.FilterChain

public final class IteratingFilterChain
extends Object
implements javax.servlet.FilterChain

This FilterChain passes control from the first Filter in an iterator to the last. When the last iterator calls the chain.doFilter(request, response) method, the supplied "parent" chain has control returned to it.

Since:
2.1.0

Constructor Summary
IteratingFilterChain(Iterator<javax.servlet.Filter> iterator, javax.servlet.FilterChain chain)
          Create a new IteratingFilterChain which iterates over the Filters in the supplied Iterator and then returns control to the main FilterChain.
 
Method Summary
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratingFilterChain

public IteratingFilterChain(Iterator<javax.servlet.Filter> iterator,
                            javax.servlet.FilterChain chain)
Create a new IteratingFilterChain which iterates over the Filters in the supplied Iterator and then returns control to the main FilterChain.

Parameters:
iterator - Iterator over the Filters to apply
chain - FilterChain to return control to after the last Filter in the iterator has called the chain.doFilter(request, response) method.
Method Detail

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response)
              throws IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in interface javax.servlet.FilterChain
Throws:
IOException
javax.servlet.ServletException


Copyright © 2010 Atlassian. All Rights Reserved.