public class FilterProcessor
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FilterProcessor.BasicFilterUsageNotifier
Publishes a counter metric for each filter on each use.
|
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
FilterProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
error()
runs all "error" filters.
|
static FilterProcessor |
getInstance() |
void |
postRoute()
runs "post" filters which are called after "route" filters.
|
void |
preRoute()
runs all "pre" filters.
|
java.lang.Object |
processZuulFilter(ZuulFilter filter)
Processes an individual ZuulFilter.
|
void |
route()
Runs all "route" filters.
|
java.lang.Object |
runFilters(java.lang.String sType)
runs all filters of the filterType sType/ Use this method within filters to run custom filters by type
|
void |
setFilterUsageNotifier(FilterUsageNotifier notifier)
Override the default filter usage notification impl.
|
static void |
setProcessor(FilterProcessor processor)
sets a singleton processor in case of a need to override default behavior
|
public static FilterProcessor getInstance()
public static void setProcessor(FilterProcessor processor)
processor - public void setFilterUsageNotifier(FilterUsageNotifier notifier)
notifier - public void postRoute()
throws ZuulException
ZuulExceptionpublic void error()
public void route()
throws ZuulException
ZuulException - if an exception occurs.public void preRoute()
throws ZuulException
ZuulExceptionpublic java.lang.Object runFilters(java.lang.String sType)
throws java.lang.Throwable
sType - the filterType.java.lang.Throwable - throws up an arbitrary exceptionpublic java.lang.Object processZuulFilter(ZuulFilter filter) throws ZuulException
filter - ZuulException