Package org.asynchttpclient.filter
Interface ResponseFilter
-
public interface ResponseFilterA Filter interface that gets invoked before making the processing of the response bytes.ResponseFilterare invoked before the actual response's status code get processed. That means authorization, proxy authentication and redirects processing hasn't occurred whenResponseFiltergets invoked.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> FilterContext<T>filter(FilterContext<T> ctx)AnAsyncHttpClientwill invokefilter(org.asynchttpclient.filter.FilterContext<T>)and will use the returnedFilterContext.replayRequest()andFilterContext.getAsyncHandler()to decide if the response processing can continue.
-
-
-
Method Detail
-
filter
<T> FilterContext<T> filter(FilterContext<T> ctx) throws FilterException
AnAsyncHttpClientwill invokefilter(org.asynchttpclient.filter.FilterContext<T>)and will use the returnedFilterContext.replayRequest()andFilterContext.getAsyncHandler()to decide if the response processing can continue. IfFilterContext.replayRequest()return true, a new request will be made usingFilterContext.getRequest()and the current response processing will be ignored.- Type Parameters:
T- the handler result type- Parameters:
ctx- aFilterContext- Returns:
FilterContext. TheFilterContextinstance may not the same as the original one.- Throws:
FilterException- to interrupt the filter processing.
-
-