Package org.apache.http.protocol
Interface HttpResponseInterceptorList
- All Known Implementing Classes:
BasicHttpProcessor
public interface HttpResponseInterceptorList
Provides access to an ordered list of response interceptors.
Lists are expected to be built upfront and used read-only afterwards
for
processing.- Since:
- 4.0
- Version:
- $Revision: 554903 $
- Author:
- Roland Weber
-
Method Summary
Modifier and Type Method Description voidaddResponseInterceptor(HttpResponseInterceptor itcp)Appends a response interceptor to this list.voidaddResponseInterceptor(HttpResponseInterceptor itcp, int index)Inserts a response interceptor at the specified index.voidclearResponseInterceptors()Removes all response interceptors from this list.HttpResponseInterceptorgetResponseInterceptor(int index)Obtains a response interceptor from this list.intgetResponseInterceptorCount()Obtains the current size of this list.voidremoveResponseInterceptorByClass(Class clazz)Removes all response interceptor of the specified classvoidsetInterceptors(List itcps)Sets the response interceptors in this list.
-
Method Details
-
addResponseInterceptor
Appends a response interceptor to this list.- Parameters:
itcp- the response interceptor to add
-
addResponseInterceptor
Inserts a response interceptor at the specified index.- Parameters:
itcp- the response interceptor to addindex- the index to insert the interceptor at
-
getResponseInterceptorCount
int getResponseInterceptorCount()Obtains the current size of this list.- Returns:
- the number of response interceptors in this list
-
getResponseInterceptor
Obtains a response interceptor from this list.- Parameters:
index- the index of the interceptor to obtain, 0 for first- Returns:
- the interceptor at the given index, or
nullif the index is out of range
-
clearResponseInterceptors
void clearResponseInterceptors()Removes all response interceptors from this list. -
removeResponseInterceptorByClass
Removes all response interceptor of the specified class- Parameters:
clazz- the class of the instances to be removed.
-
setInterceptors
Sets the response interceptors in this list. This list will be cleared and re-initialized to contain all response interceptors from the argument list. If the argument list includes elements that are not response interceptors, the behavior is implementation dependent.- Parameters:
itcps- the list of response interceptors
-