public class ThrottleRequestFilter extends Object implements RequestFilter
RequestFilter throttles requests and block when the number of permits is reached, waiting for
the response to arrives before executing the next request.| Constructor and Description |
|---|
ThrottleRequestFilter(int maxConnections) |
ThrottleRequestFilter(int maxConnections,
int maxWait) |
| Modifier and Type | Method and Description |
|---|---|
FilterContext |
filter(FilterContext ctx)
An
AsyncHttpProvider will invoke RequestFilter.filter(com.ning.http.client.filter.FilterContext<T>) and will use the
returned FilterContext.getRequest() and FilterContext.getAsyncHandler() to continue the request
processing. |
public ThrottleRequestFilter(int maxConnections)
public ThrottleRequestFilter(int maxConnections,
int maxWait)
public FilterContext filter(FilterContext ctx) throws FilterException
RequestFilterAsyncHttpProvider will invoke RequestFilter.filter(com.ning.http.client.filter.FilterContext<T>) and will use the
returned FilterContext.getRequest() and FilterContext.getAsyncHandler() to continue the request
processing.filter in interface RequestFilterctx - a FilterContextFilterContext. The FilterContext instance may not the same as the original one.FilterException - to interrupt the filter processing.Copyright © 2017-2019 Eclipse Foundation. All Rights Reserved.