Package com.netflix.zuul
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 Summary
Modifier and TypeFieldDescriptionstatic final Comparator<Class<? extends ZuulFilter<?,
?>>> static final Comparator<ZuulFilter<?,
?>> -
Method Summary
Modifier and TypeMethodDescriptionZuulFilter<?,
?> getFilterByNameAndType
(String name, FilterType type) SortedSet<ZuulFilter<?,
?>> getFiltersByType
(FilterType filterType) Returns a sorted set of filters by the filterType specified.boolean
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.ZuulFilter<?,
?> putFilterForClassName
(String className) List<ZuulFilter<?,
?>> putFiltersForClasses
(String[] classNames) Load and cache filters by className.
-
Field Details
-
FILTER_COMPARATOR
-
FILTER_CLASS_COMPARATOR
-
-
Method Details
-
putFilter
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
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
- Throws:
Exception
-
getFiltersByType
Returns a sorted set of filters by the filterType specified. -
getFilterByNameAndType
-