Package org.asynchttpclient.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 occurred whenResponseFilter
gets invoked.
-
-
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.replayRequest()
andFilterContext.getAsyncHandler()
to decide if the response processing can continue.
-
-
-
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.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
. TheFilterContext
instance may not the same as the original one.- Throws:
FilterException
- to interrupt the filter processing.
-
-