org.mycore.frontend.filter
Class MCRUserAgentFilter

java.lang.Object
  extended by org.mycore.frontend.filter.MCRUserAgentFilter
All Implemented Interfaces:
Filter

public class MCRUserAgentFilter
extends Object
implements Filter

Automatically closes HttpSession of certain user agents. If the User-Agent header matches a regular expression defined by the property MCR.Filter.UserAgent (default: "(bot|spider|crawler|mercator|slurp|seek|nagios)") the HTTP session is closed after the request.

Author:
Thomas Scheffler (yagee)

Constructor Summary
MCRUserAgentFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(ServletRequest sreq, ServletResponse sres, FilterChain chain)
           
 void init(FilterConfig arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCRUserAgentFilter

public MCRUserAgentFilter()
Method Detail

init

public void init(FilterConfig arg0)
          throws ServletException
Specified by:
init in interface Filter
Throws:
ServletException

destroy

public void destroy()
Specified by:
destroy in interface Filter

doFilter

public void doFilter(ServletRequest sreq,
                     ServletResponse sres,
                     FilterChain chain)
              throws IOException,
                     ServletException
Specified by:
doFilter in interface Filter
Throws:
IOException
ServletException