Module org.eclipse.jgit.http.server
Class RegexGroupFilter
java.lang.Object
org.eclipse.jgit.http.server.glue.RegexGroupFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
Switch servlet path and path info to use another regex match group.
This filter is meant to be installed in the middle of a pipeline created by
MetaServlet.serveRegex(String). The
passed request's servlet path is updated to be all text up to the start of
the designated capture group, and the path info is changed to the contents of
the capture group.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RegexGroupFilter
public RegexGroupFilter(int groupIdx) Constructor for RegexGroupFilter- Parameters:
groupIdx- capture group number, 1 through the number of groups.
-
-
Method Details
-
init
public void init(jakarta.servlet.FilterConfig config) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Filter- Throws:
jakarta.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejakarta.servlet.Filter
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse rsp, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Specified by:
doFilterin interfacejakarta.servlet.Filter- Throws:
IOExceptionjakarta.servlet.ServletException
-