public class ThrottleInterceptor extends AbstractInterceptor
The throttle feature can slow down traffic to thwart denial of service attacks.
Interceptor.Flowid, name, router| Constructor and Description |
|---|
ThrottleInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
int |
getBusyDelay() |
long |
getDelay() |
String |
getLongDescription() |
int |
getMaxThreads() |
String |
getShortDescription() |
void |
handleAbort(Exchange exchange)
Called when any
Interceptor.handleRequest(Exchange) or
Interceptor.handleResponse(Exchange) later in the chain returned
Outcome.ABORT or threw an exception. |
Outcome |
handleRequest(Exchange exc) |
Outcome |
handleResponse(Exchange exc) |
void |
setBusyDelay(int busyDelay) |
void |
setDelay(long delay) |
void |
setMaxThreads(int maxThreads) |
getDisplayName, getFlow, getHelpId, getId, getRouter, getRule, init, init, setDisplayName, setFlow, setIdpublic Outcome handleRequest(Exchange exc) throws Exception
handleRequest in interface InterceptorhandleRequest in class AbstractInterceptorExceptionpublic Outcome handleResponse(Exchange exc) throws Exception
handleResponse in interface InterceptorhandleResponse in class AbstractInterceptorExceptionpublic void handleAbort(Exchange exchange)
InterceptorInterceptor.handleRequest(Exchange) or
Interceptor.handleResponse(Exchange) later in the chain returned
Outcome.ABORT or threw an exception.
handleAbort is called in the reverse order of the chain (as
handleResponse is).handleAbort in interface InterceptorhandleAbort in class AbstractInterceptorpublic long getDelay()
public void setDelay(long delay)
public int getMaxThreads()
public void setMaxThreads(int maxThreads)
public int getBusyDelay()
public void setBusyDelay(int busyDelay)
public String getShortDescription()
getShortDescription in interface InterceptorgetShortDescription in class AbstractInterceptorpublic String getLongDescription()
getLongDescription in interface InterceptorgetLongDescription in class AbstractInterceptorCopyright © 2021. All Rights Reserved.