Package com.ning.http.client.filter
Interface ResponseFilter
public interface ResponseFilter
A Filter interface that gets invoked before making the processing of the response bytes.
ResponseFilter are invoked
before the actual response's status code get processed. That means authorization, proxy authentication and redirects
processing hasn't occured when ResponseFilter gets invoked.-
Method Summary
Modifier and TypeMethodDescription<T> FilterContext<T>filter(FilterContext<T> ctx) AnAsyncHttpProviderwill invokefilter(com.ning.http.client.filter.FilterContext<T>)and will use the returnedFilterContext.replayRequest()andFilterContext.getAsyncHandler()to decide if the response processing can continue.
-
Method Details
-
filter
AnAsyncHttpProviderwill invokefilter(com.ning.http.client.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.- Parameters:
ctx- aFilterContext- Returns:
FilterContext. TheFilterContextinstance may not the same as the original one.- Throws:
FilterException- to interrupt the filter processing.
-