Package jenkins.util

Interface HttpServletFilter

All Superinterfaces:
ExtensionPoint
All Known Implementing Classes:
ResourceDomainFilter, UserLanguages.AcceptLanguageFilter

public interface HttpServletFilter extends ExtensionPoint
More convenient and declarative way to use PluginServletFilter. Register an implementation if you wish to intercept certain HTTP requests. Typical implementations will inspect HttpServletRequest.getPathInfo() to determine if they should be active.
Since:
2.406
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface hudson.ExtensionPoint

    ExtensionPoint.LegacyInstancesAreScopedToHudson
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    handle(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp)
    Potentially intercepts or otherwise modifies an HTTP request.
    static void
     
  • Method Details

    • handle

      boolean handle(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp) throws IOException, jakarta.servlet.ServletException
      Potentially intercepts or otherwise modifies an HTTP request.
      Parameters:
      req - as in Filter.doFilter(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain)
      rsp - as in Filter.doFilter(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain)
      Returns:
      true if this request was handled; false to proceed with other handlers (FilterChain)
      Throws:
      IOException - as in Filter.doFilter(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain)
      jakarta.servlet.ServletException - as in Filter.doFilter(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain)
    • register

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @Initializer static void register() throws jakarta.servlet.ServletException
      Throws:
      jakarta.servlet.ServletException