com.caucho.filters
Class HeaderFilter

java.lang.Object
  extended by com.caucho.filters.HeaderFilter
All Implemented Interfaces:
Filter

public class HeaderFilter
extends java.lang.Object
implements Filter

Adds custom headers to a response

Since:
Resin 3.2.1

Nested Class Summary
static class HeaderFilter.Header
           
 
Constructor Summary
HeaderFilter()
           
 
Method Summary
 void addHeader(HeaderFilter.Header header)
           
 void destroy()
          Any cleanup for the filter.
 void doFilter(ServletRequest request, ServletResponse response, FilterChain nextFilter)
          Creates a wrapper to compress the output.
 void init(FilterConfig config)
          Initialize the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeaderFilter

public HeaderFilter()
Method Detail

addHeader

public void addHeader(HeaderFilter.Header header)

init

public void init(FilterConfig config)
          throws ServletException
Description copied from interface: Filter
Initialize the filter.

Specified by:
init in interface Filter
Throws:
ServletException

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain nextFilter)
              throws ServletException,
                     java.io.IOException
Creates a wrapper to compress the output.

Specified by:
doFilter in interface Filter
Parameters:
request - the servlet request
response - the servlet response
nextFilter - the next filter in the chain
Throws:
ServletException
java.io.IOException

destroy

public void destroy()
Any cleanup for the filter.

Specified by:
destroy in interface Filter