The pattern is bound and matched against the path info of the servlet
request, as this class assumes it is invoked by MetaServlet.
If there are capture groups in the regular expression, the matched ranges of
the capture groups are stored as an array of modified HttpServetRequests,
into the request attribute MetaFilter#REGEX_GROUPS. Using a capture
group that may not capture, e.g. "(/foo)?", will cause an error at
request handling time.
Each servlet request has been altered to have its getServletPath()
method return the original path info up to the beginning of the corresponding
capture group, and its getPathInfo() method return the matched text.
A RegexGroupFilter can be applied in the pipeline to switch the
current HttpServletRequest to reference a different capture group before
running additional filters, or the final servlet.
Note that for getPathInfo() to start with a leading "/" as described
in the servlet documentation, capture groups must actually capture the
leading "/".
This class dispatches the remainder of the pipeline using the first capture
group as the current request, making RegexGroupFilter required only
to access capture groups beyond the first.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | match(HttpServletRequest
current HTTP request being considered by req)MetaServlet.Implements abstract org. Determine if this pipeline handles the request's URL. |
| pack-priv void | service(HttpServletRequest
current HTTP request. req, HttpServletResponse current HTTP response. rsp)Overrides org. Execute the filters and the servlet on the request. |
| public String |
| pattern | back to summary |
|---|---|
| private final Pattern pattern | |
| RegexPipeline | back to summary |
|---|---|
| pack-priv RegexPipeline(final Pattern pattern, final Filter[] filters, final HttpServlet servlet) | |
| match | back to summary |
|---|---|
| pack-priv boolean match(HttpServletRequest req) Implements abstract org. Doc from org. Determine if this pipeline handles the request's URL.
This method should match on the request's
| |
| service | back to summary |
|---|---|
| pack-priv void service(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException Overrides org. Doc from org. Execute the filters and the servlet on the request.
Invoked by
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv UrlPipeline | create()
Implements abstract org. Create UrlPipeline |
| pattern | back to summary |
|---|---|
| private final Pattern pattern | |
| Binder | back to summary |
|---|---|
| pack-priv Binder(String p) | |
| Binder | back to summary |
|---|---|
| pack-priv Binder(Pattern p) | |
| create | back to summary |
|---|---|
| pack-priv UrlPipeline create() Implements abstract org. Doc from org. Create UrlPipeline
| |