Class SlingFilterChainHelper

java.lang.Object
org.apache.sling.engine.impl.filter.SlingFilterChainHelper

public class SlingFilterChainHelper extends Object
The SlingFilterChainHelper class is used by Sling to support building lists of Filters. To ensure filter ordering, each filter is optionally registered with an ordering index. If none is provided the default ordering index is Integer.MAX_VALUE to append the filter to the end of the list.
  • Constructor Details

    • SlingFilterChainHelper

      public SlingFilterChainHelper()
  • Method Details

    • addFilter

      public void addFilter(javax.servlet.Filter filter, FilterPredicate pattern, long filterId, int order, String orderSource, FilterProcessorMBeanImpl mbean)
      Add a filter
      Parameters:
      filter - The filter
      pattern - Optional pattern
      filterId - Id of the filter
      order - The order index
      orderSource - The source for the order
      mbean - MBean
    • removeFilterById

      public boolean removeFilterById(long filterId)
    • getFilters

      public FilterHandle[] getFilters()
      Returns the list of Filters added to this instance. The array might be empty This method doesn't need to be synced as the update is atomioc.
      Returns:
      the filters