Top Description Methods
org.apache.http.protocol

public Interface HttpRequestInterceptorList

Known Direct Implementers
org.apache.http.protocol.BasicHttpProcessor
Annotations
@Deprecated
Imports
java.util.List, org.apache.http.HttpRequestInterceptor

Deprecated

(4.3)

Provides access to an ordered list of request interceptors. Lists are expected to be built upfront and used read-only afterwards for processing.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public void
addRequestInterceptor(HttpRequestInterceptor
the request interceptor to add
interceptor
)

Appends a request interceptor to this list.

public void
addRequestInterceptor(HttpRequestInterceptor
the request interceptor to add
interceptor
,
int
the index to insert the interceptor at
index
)

Inserts a request interceptor at the specified index.

public void
clearRequestInterceptors()

Removes all request interceptors from this list.

public HttpRequestInterceptor

Returns:

the interceptor at the given index, or null if the index is out of range
getRequestInterceptor
(int
the index of the interceptor to obtain, 0 for first
index
)

Obtains a request interceptor from this list.

public int

Returns:

the number of request interceptors in this list
getRequestInterceptorCount
()

Obtains the current size of this list.

public void
removeRequestInterceptorByClass(Class<? extends HttpRequestInterceptor>
the class of the instances to be removed.
clazz
)

Removes all request interceptor of the specified class

public void
setInterceptors(List<?>
the list of request interceptors
list
)

Sets the request interceptors in this list.

Method Detail

addRequestInterceptorback to summary
public void addRequestInterceptor(HttpRequestInterceptor interceptor)

Appends a request interceptor to this list.

Parameters
interceptor:HttpRequestInterceptor

the request interceptor to add

addRequestInterceptorback to summary
public void addRequestInterceptor(HttpRequestInterceptor interceptor, int index)

Inserts a request interceptor at the specified index.

Parameters
interceptor:HttpRequestInterceptor

the request interceptor to add

index:int

the index to insert the interceptor at

clearRequestInterceptorsback to summary
public void clearRequestInterceptors()

Removes all request interceptors from this list.

getRequestInterceptorback to summary
public HttpRequestInterceptor getRequestInterceptor(int index)

Obtains a request interceptor from this list.

Parameters
index:int

the index of the interceptor to obtain, 0 for first

Returns:HttpRequestInterceptor

the interceptor at the given index, or null if the index is out of range

getRequestInterceptorCountback to summary
public int getRequestInterceptorCount()

Obtains the current size of this list.

Returns:int

the number of request interceptors in this list

removeRequestInterceptorByClassback to summary
public void removeRequestInterceptorByClass(Class<? extends HttpRequestInterceptor> clazz)

Removes all request interceptor of the specified class

Parameters
clazz:Class<? extends HttpRequestInterceptor>

the class of the instances to be removed.

setInterceptorsback to summary
public void setInterceptors(List<?> list)

Sets the request interceptors in this list. This list will be cleared and re-initialized to contain all request interceptors from the argument list. If the argument list includes elements that are not request interceptors, the behavior is implementation dependent.

Parameters
list:List<?>

the list of request interceptors