Callers can create and configure a new processing pipeline by using one of
the serve(String) or serveRegex(String) methods to allocate
a binder for a particular URL pattern.
Registered filters and servlets are initialized lazily, usually during the first request. Once initialized the bindings in this servlet cannot be modified without destroying the servlet and thereby destroying all registered filters and servlets.
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private volatile UrlPipeline[] | |
| pack-priv static final String | |
| private ServletContext |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private UrlPipeline[] | |
| public void | destroy()
Overrides default jakarta. Called by the web container to indicate to a filter that it is being taken out of service. |
| public void | doFilter(ServletRequest
the request, ServletResponse ServletRequest object contains the client's requestthe response, FilterChain ServletResponse object contains the filter's responsethe chain)FilterChain for invoking the next filter or the resourceImplements jakarta. The |
| private UrlPipeline | |
| private UrlPipeline[] | |
| public void | init(FilterConfig
a filterConfig)FilterConfig object containing the filter's configuration and initialization
parametersOverrides default jakarta. Called by the web container to indicate to a filter that it is being placed into service. |
| private static Set | |
| private ServletBinder | |
| protected ServletBinder | Returns: binder for the caller, potentially after adding one or more filters into the pipeline.the newly created binder. b)Configure a newly created binder. |
| public ServletBinder | |
| public ServletBinder | Returns: binder for the passed expression.the regular expression to pattern match the URL against. expression)Construct a binding for a regular expression. |
| public ServletBinder | Returns: binder for the passed expression.the regular expression to pattern match the URL against. pattern)Construct a binding for a regular expression. |
| bindings | back to summary |
|---|---|
| private final List<ServletBinderImpl> bindings | |
| pipelines | back to summary |
|---|---|
| private volatile UrlPipeline[] pipelines | |
| REGEX_GROUPS | back to summary |
|---|---|
| pack-priv static final String REGEX_GROUPS | |
| servletContext | back to summary |
|---|---|
| private ServletContext servletContext | |
| MetaFilter | back to summary |
|---|---|
| public MetaFilter() Empty filter with no bindings. | |
| createPipelines | back to summary |
|---|---|
| private UrlPipeline[] createPipelines() throws ServletException | |
| destroy | back to summary |
|---|---|
| public void destroy() Overrides default jakarta. Doc from jakarta. Called by the web container to indicate to a filter that it is being taken out of service. This method is only called once all threads within the filter's doFilter method have exited or after a timeout period has passed. After the web container calls this method, it will not call the doFilter method again on this instance of the filter. This method gives the filter an opportunity to clean up any resources that are being held (for example, memory, file handles, threads) and make sure that any persistent state is synchronized with the filter's current state in memory.
| |
| doFilter | back to summary |
|---|---|
| public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException Implements jakarta. Doc from jakarta. The A typical implementation of this method would follow the following pattern:
| |
| find | back to summary |
|---|---|
| private UrlPipeline find(HttpServletRequest req) throws ServletException | |
| getPipelines | back to summary |
|---|---|
| private UrlPipeline[] getPipelines() throws ServletException | |
| init | back to summary |
|---|---|
| public void init(FilterConfig filterConfig) throws ServletException Overrides default jakarta. Doc from jakarta. Called by the web container to indicate to a filter that it is being placed into service.
The servlet container calls the init method exactly once after instantiating the filter. The init method must
complete successfully before the filter is asked to do any filtering work. The container will ensure that actions
performed in the The web container cannot place the filter into service if the init method either
| |
| newIdentitySet | back to summary |
|---|---|
| private static Set | |
| register | back to summary |
|---|---|
| private ServletBinder register(ServletBinderImpl b) | |
| register | back to summary |
|---|---|
| protected ServletBinder register(ServletBinder b) Configure a newly created binder.
| |
| serve | back to summary |
|---|---|
| public ServletBinder serve(String path) Construct a binding for a specific path.
| |
| serveRegex | back to summary |
|---|---|
| public ServletBinder serveRegex(String expression) Construct a binding for a regular expression.
| |
| serveRegex | back to summary |
|---|---|
| public ServletBinder serveRegex(Pattern pattern) Construct a binding for a regular expression.
| |