Class DosGuardFilter
- java.lang.Object
-
- fr.paris.lutece.portal.web.upload.DosGuardFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
public class DosGuardFilter extends java.lang.Object implements javax.servlet.FilterA 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
Constructors Constructor Description DosGuardFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)voidinit(javax.servlet.FilterConfig config)booleanisAllowed(java.lang.String strRemoteAddr, int iContentLength)Checks if a client is allowed to make a request at the present time.
-
-
-
Method Detail
-
init
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException- Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()
- Specified by:
destroyin interfacejavax.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:
doFilterin interfacejavax.servlet.Filter- Throws:
java.io.IOExceptionjavax.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 clientiContentLength- the size of the request- Returns:
- true if allowed, false otherwize
-
-