Class FilterRegistry
java.lang.Object
org.apache.felix.http.base.internal.registry.FilterRegistry
The filter registry keeps track of all filter mappings for a single servlet context.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFilter(@NotNull FilterHandler handler) Add a filter.voidcleanup()@NotNull FilterHandler[]getFilterHandlers(@Nullable ServletHandler handler, @NotNull jakarta.servlet.DispatcherType dispatcherType, @NotNull String requestURI) Get all filters handling the request.voidgetRuntimeInfo(org.osgi.service.servlet.runtime.dto.ServletContextDTO servletContextDTO, Collection<org.osgi.service.servlet.runtime.dto.FailedFilterDTO> failedFilterDTOs) Get the runtime information about filtersvoidremoveFilter(@NotNull FilterInfo filterInfo, boolean destroy) Remove a filter
-
Constructor Details
-
FilterRegistry
public FilterRegistry()
-
-
Method Details
-
addFilter
Add a filter.- Parameters:
handler- The handler for the filter
-
removeFilter
Remove a filter- Parameters:
filterInfo- The filter infodestroy- boolean flag indicating whether to call destroy on the filter.
-
cleanup
public void cleanup() -
getFilterHandlers
@NotNull public @NotNull FilterHandler[] getFilterHandlers(@Nullable @Nullable ServletHandler handler, @NotNull @NotNull jakarta.servlet.DispatcherType dispatcherType, @NotNull @NotNull String requestURI) Get all filters handling the request. Filters are applied to the url and/or the servlet- Parameters:
handler- Optional servlet handlerdispatcherType- The dispatcher typerequestURI- The request uri- Returns:
- The array of filter handlers, might be empty.
-
getRuntimeInfo
public void getRuntimeInfo(org.osgi.service.servlet.runtime.dto.ServletContextDTO servletContextDTO, Collection<org.osgi.service.servlet.runtime.dto.FailedFilterDTO> failedFilterDTOs) Get the runtime information about filters- Parameters:
servletContextDTO- The servlet context DTOfailedFilterDTOs- The collection holding the failed filters.
-