Class RateLimitFilter

java.lang.Object
jakarta.servlet.GenericFilter
jakarta.servlet.http.HttpFilter
org.deltava.servlet.filter.RateLimitFilter
All Implemented Interfaces:
jakarta.servlet.Filter, jakarta.servlet.FilterConfig, Serializable, Thread.UncaughtExceptionHandler

public class RateLimitFilter extends jakarta.servlet.http.HttpFilter implements Thread.UncaughtExceptionHandler
A servlet filter to do HTTP rate limiting.
Since:
11.6
Version:
12.3
Author:
Luke
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doFilter(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp, jakarta.servlet.FilterChain fc)
     
    void
    init(jakarta.servlet.FilterConfig cfg)
     
    void
     

    Methods inherited from class jakarta.servlet.http.HttpFilter

    doFilter

    Methods inherited from class jakarta.servlet.GenericFilter

    getFilterConfig, getFilterName, getInitParameter, getInitParameterNames, getServletContext, init

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface jakarta.servlet.Filter

    destroy
  • Constructor Details

    • RateLimitFilter

      public RateLimitFilter()
  • Method Details

    • init

      public void init(jakarta.servlet.FilterConfig cfg) throws jakarta.servlet.ServletException
      Specified by:
      init in interface jakarta.servlet.Filter
      Overrides:
      init in class jakarta.servlet.GenericFilter
      Throws:
      jakarta.servlet.ServletException
    • doFilter

      public void doFilter(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp, jakarta.servlet.FilterChain fc) throws IOException, jakarta.servlet.ServletException
      Overrides:
      doFilter in class jakarta.servlet.http.HttpFilter
      Throws:
      IOException
      jakarta.servlet.ServletException
    • uncaughtException

      public void uncaughtException(Thread t, Throwable e)
      Specified by:
      uncaughtException in interface Thread.UncaughtExceptionHandler