fr.paris.lutece.portal.web.upload
Class DosGuardFilter

java.lang.Object
  extended by fr.paris.lutece.portal.web.upload.DosGuardFilter
All Implemented Interfaces:
javax.servlet.Filter

public class DosGuardFilter
extends java.lang.Object
implements javax.servlet.Filter

A rewrite of the multipart filter from the com.oreilly.servlet package. The rewrite allows us to use initialization parameters specified in the Lutece configuration files.


Constructor Summary
DosGuardFilter()
           
 
Method Summary
 void destroy()
          
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          
 void init(javax.servlet.FilterConfig config)
          
 boolean isAllowed(java.lang.String strRemoteAddr, int iContentLength)
          Checks if a client is allowed to make a request at the present time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DosGuardFilter

public DosGuardFilter()
Method Detail

init

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

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

destroy

public void destroy()

Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException

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

isAllowed

public boolean isAllowed(java.lang.String strRemoteAddr,
                         int iContentLength)
Checks if a client is allowed to make a request at the present time.

Parameters:
strRemoteAddr - the IP address of the client
iContentLength - the size of the request
Returns:
true if allowed, false otherwize


Copyright © 2011 Mairie de Paris. All Rights Reserved.