Package jenkins.util
Interface HttpServletFilter
- All Superinterfaces:
ExtensionPoint
- All Known Implementing Classes:
ResourceDomainFilter
,UserLanguages.AcceptLanguageFilter
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
-
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 inFilter.doFilter(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain)
rsp
- as inFilter.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 inFilter.doFilter(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain)
jakarta.servlet.ServletException
- as inFilter.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
-