info.magnolia.cms.filters
Class MgnlFilterDispatcher

java.lang.Object
  extended by info.magnolia.cms.filters.MgnlFilterDispatcher

public class MgnlFilterDispatcher
extends Object

Dispatches requests onto Magnolias filter chain, if the filter chain is bypassed for this request it passes it on to the next filter in web.xml.

Version:
$Id$
See Also:
FilterManager, SafeDestroyMgnlFilterWrapper

Constructor Summary
MgnlFilterDispatcher()
           
 
Method Summary
 void doDispatch(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          Calls the target filter if it matches the request otherwise passes the request on to the next filter in web.xml.
 MgnlFilter getTargetFilter()
          Returns the current target filter, the returned instance will be destroyed if the target filter is replaced.
 SafeDestroyMgnlFilterWrapper getTargetFilterAndAcquireReadLock()
          Returns the current target filter with a read lock held.
 MgnlFilter replaceTargetFilter(MgnlFilter newFilter)
          Replaces the current filter with a new one and returns the previous filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MgnlFilterDispatcher

public MgnlFilterDispatcher()
Method Detail

doDispatch

public void doDispatch(javax.servlet.ServletRequest request,
                       javax.servlet.ServletResponse response,
                       javax.servlet.FilterChain chain)
                throws IOException,
                       javax.servlet.ServletException
Calls the target filter if it matches the request otherwise passes the request on to the next filter in web.xml.

Throws:
IOException
javax.servlet.ServletException

replaceTargetFilter

public MgnlFilter replaceTargetFilter(MgnlFilter newFilter)
Replaces the current filter with a new one and returns the previous filter. See SafeDestroyMgnlFilterWrapper.Switcher.replaceFilter(SafeDestroyMgnlFilterWrapper) for usage constraints on the returned filter.


getTargetFilterAndAcquireReadLock

public SafeDestroyMgnlFilterWrapper getTargetFilterAndAcquireReadLock()
Returns the current target filter with a read lock held. The returned filter will not be destroyed before the read lock is released.


getTargetFilter

public MgnlFilter getTargetFilter()
Returns the current target filter, the returned instance will be destroyed if the target filter is replaced.

See Also:
SafeDestroyMgnlFilterWrapper.Switcher.getFilter()


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.