Package org.asynchttpclient.filter
Interface RequestFilter
-
- All Known Implementing Classes:
ThrottleRequestFilter
public interface RequestFilter
A Filter interface that gets invoked before making an actual request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> FilterContext<T>
filter(FilterContext<T> ctx)
AnAsyncHttpClient
will invokefilter(org.asynchttpclient.filter.FilterContext<T>)
and will use the returnedFilterContext.getRequest()
andFilterContext.getAsyncHandler()
to continue the request processing.
-
-
-
Method Detail
-
filter
<T> FilterContext<T> filter(FilterContext<T> ctx) throws FilterException
AnAsyncHttpClient
will invokefilter(org.asynchttpclient.filter.FilterContext<T>)
and will use the returnedFilterContext.getRequest()
andFilterContext.getAsyncHandler()
to continue the request processing.- Type Parameters:
T
- the handler result type- Parameters:
ctx
- aFilterContext
- Returns:
FilterContext
. TheFilterContext
instance may not the same as the original one.- Throws:
FilterException
- to interrupt the filter processing.
-
-