fr.paris.lutece.portal.web.upload
Class DosGuardFilter
java.lang.Object
fr.paris.lutece.portal.web.upload.DosGuardFilter
- All Implemented Interfaces:
- javax.servlet.Filter
public class DosGuardFilter
- extends 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.
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(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 |
DosGuardFilter
public DosGuardFilter()
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 IOException,
javax.servlet.ServletException
-
- Specified by:
doFilter
in interface javax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
isAllowed
public boolean isAllowed(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
Copyright © 2014 Mairie de Paris. All Rights Reserved.