ro.isdc.wro.http.support
Class AbstractProcessorsFilter

java.lang.Object
  extended by ro.isdc.wro.http.support.AbstractProcessorsFilter
All Implemented Interfaces:
javax.servlet.Filter
Direct Known Subclasses:
CoffeeScriptFilter, LessCssFilter

public abstract class AbstractProcessorsFilter
extends Object
implements javax.servlet.Filter

Allows configuration of a list of processors to be applied on the

Since:
1.4.5
Author:
Alex Objelean

Constructor Summary
AbstractProcessorsFilter()
           
 
Method Summary
 void destroy()
          
 void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain)
          
protected  void doInit(javax.servlet.FilterConfig config)
          Allows custom initialization.
protected abstract  List<ResourcePreProcessor> getProcessorsList()
           
 void init(javax.servlet.FilterConfig config)
          
protected  void onRuntimeException(RuntimeException e, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)
          Invoked when a RuntimeException is thrown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProcessorsFilter

public AbstractProcessorsFilter()
Method Detail

init

public final void init(javax.servlet.FilterConfig config)
                throws javax.servlet.ServletException

Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

doInit

protected void doInit(javax.servlet.FilterConfig config)
Allows custom initialization.


doFilter

public void doFilter(javax.servlet.ServletRequest req,
                     javax.servlet.ServletResponse res,
                     javax.servlet.FilterChain chain)
              throws IOException,
                     javax.servlet.ServletException

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException

onRuntimeException

protected void onRuntimeException(RuntimeException e,
                                  javax.servlet.http.HttpServletResponse response,
                                  javax.servlet.FilterChain chain)
Invoked when a RuntimeException is thrown. Allows custom exception handling. The default implementation redirects to 404 for a specific WroRuntimeException exception when in DEPLOYMENT mode.

Parameters:
e - RuntimeException thrown during request processing.

getProcessorsList

protected abstract List<ResourcePreProcessor> getProcessorsList()
Returns:
a list of processors to apply for this filter.

destroy

public void destroy()

Specified by:
destroy in interface javax.servlet.Filter


Copyright © 2008-2013. All Rights Reserved.