Interface FilterLoader

All Known Implementing Classes:
DynamicFilterLoader, StaticFilterLoader

public interface FilterLoader
This class is one of the core classes in Zuul. It compiles, loads from a File, and checks if source code changed. It also holds ZuulFilters by filterType.
  • Field Details

  • Method Details

    • putFilter

      boolean putFilter(File file)
      From a file this will read the ZuulFilter source code, compile it, and add it to the list of current filters a true response means that it was successful.
      Parameters:
      file - the file to load
      Returns:
      true if the filter in file successfully read, compiled, verified and added to Zuul
    • putFiltersForClasses

      List<ZuulFilter<?,?>> putFiltersForClasses(String[] classNames) throws Exception
      Load and cache filters by className.
      Parameters:
      classNames - The class names to load
      Returns:
      List of the loaded filters
      Throws:
      Exception - If any specified filter fails to load, this will abort. This is a safety mechanism so we can prevent running in a partially loaded state.
    • putFilterForClassName

      ZuulFilter<?,?> putFilterForClassName(String className) throws Exception
      Throws:
      Exception
    • getFiltersByType

      SortedSet<ZuulFilter<?,?>> getFiltersByType(FilterType filterType)
      Returns a sorted set of filters by the filterType specified.
    • getFilterByNameAndType

      ZuulFilter<?,?> getFilterByNameAndType(String name, FilterType type)