Subclasses provide the implementation of match(HttpServletRequest),
which is called by MetaServlet in registration order to determine the
pipeline that will be used to handle a request.
The very bottom of each pipeline is a single HttpServlet that will
handle producing the response for this pipeline's URL. Filters may
also be registered and applied around the servlet's processing, to manage
request attributes, set standard response headers, or completely override the
response generation.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Filter[] | |
| private final HttpServlet | servlet
Instance that must generate the response; never null. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | destroy(Set<Object>
(input/output) the set of filters and servlets which
have already been destroyed within the container context. If
those same instances appear in this pipeline they are not
destroyed a second time. Filters and servlets that are first
destroyed by this pipeline will be added to this set. destroyed)Destroy all contained filters and servlets. |
| private static void | |
| private static void | |
| pack-priv void | init(ServletContext
the servlet container context our context, Set<Object> MetaServlet is
running within.(input/output) the set of filters and servlets which
have already been initialized within the container context. If
those same instances appear in this pipeline they are not
initialized a second time. Filters and servlets that are first
initialized by this pipeline will be added to this set. inited)Initialize all contained filters and servlets. |
| private static void | |
| private static void | |
| pack-priv abstract boolean | Returns: true if this pipeline is configured to handle the
request; false otherwise.current HTTP request being considered by req)MetaServlet.Determine if this pipeline handles the request's URL. |
| pack-priv void | service(HttpServletRequest
current HTTP request. req, HttpServletResponse current HTTP response. rsp)Execute the filters and the servlet on the request. |
| filters | back to summary |
|---|---|
| private final Filter[] filters Filters to apply around | |
| servlet | back to summary |
|---|---|
| private final HttpServlet servlet Instance that must generate the response; never null. | |
| UrlPipeline | back to summary |
|---|---|
| pack-priv UrlPipeline(Filter[] filters, HttpServlet servlet) | |
| destroy | back to summary |
|---|---|
| pack-priv void destroy(Set<Object> destroyed) Destroy all contained filters and servlets.
| |
| destroyFilter | back to summary |
|---|---|
| private static void destroyFilter(Filter ref, Set<Object> destroyed) | |
| destroyServlet | back to summary |
|---|---|
| private static void destroyServlet(HttpServlet ref, Set<Object> destroyed) | |
| init | back to summary |
|---|---|
| pack-priv void init(ServletContext context, Set<Object> inited) throws ServletException Initialize all contained filters and servlets.
| |
| initFilter | back to summary |
|---|---|
| private static void initFilter(final Filter ref, final ServletContext context, final Set<Object> inited) throws ServletException | |
| initServlet | back to summary |
|---|---|
| private static void initServlet(final HttpServlet ref, final ServletContext context, final Set<Object> inited) throws ServletException | |
| match | back to summary |
|---|---|
| pack-priv abstract boolean match(HttpServletRequest req) 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 Execute the filters and the servlet on the request.
Invoked by
| |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private final Filter[] | |
| private final HttpServlet |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | doFilter(ServletRequest
the request to pass along the chain. req, ServletResponse the response to pass along the chain. rsp)Implements jakarta. Causes the next filter in the chain to be invoked, or if the calling filter is the last filter in the chain, causes the resource at the end of the chain to be invoked. |
| filterIdx | back to summary |
|---|---|
| private int filterIdx | |
| filters | back to summary |
|---|---|
| private final Filter[] filters | |
| servlet | back to summary |
|---|---|
| private final HttpServlet servlet | |
| Chain | back to summary |
|---|---|
| pack-priv Chain(Filter[] filters, HttpServlet servlet) | |
| doFilter | back to summary |
|---|---|
| public void doFilter(ServletRequest req, ServletResponse rsp) throws IOException, ServletException Implements jakarta. Doc from jakarta. Causes the next filter in the chain to be invoked, or if the calling filter is the last filter in the chain, causes the resource at the end of the chain to be invoked.
| |