public interface

HttpRequestInterceptorList

org.apache.http.protocol.HttpRequestInterceptorList
Known Indirect Subclasses

Class Overview

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

Summary

Public Methods
abstract void addRequestInterceptor(HttpRequestInterceptor interceptor, int index)
Inserts a request interceptor at the specified index.
abstract void addRequestInterceptor(HttpRequestInterceptor interceptor)
Appends a request interceptor to this list.
abstract void clearRequestInterceptors()
Removes all request interceptors from this list.
abstract HttpRequestInterceptor getRequestInterceptor(int index)
Obtains a request interceptor from this list.
abstract int getRequestInterceptorCount()
Obtains the current size of this list.
abstract void removeRequestInterceptorByClass(Class clazz)
Removes all request interceptor of the specified class
abstract void setInterceptors(List list)
Sets the request interceptors in this list.

Public Methods

public abstract void addRequestInterceptor (HttpRequestInterceptor interceptor, int index)

Inserts a request interceptor at the specified index.

Parameters
interceptor the request interceptor to add
index the index to insert the interceptor at

public abstract void addRequestInterceptor (HttpRequestInterceptor interceptor)

Appends a request interceptor to this list.

Parameters
interceptor the request interceptor to add

public abstract void clearRequestInterceptors ()

Removes all request interceptors from this list.

public abstract HttpRequestInterceptor getRequestInterceptor (int index)

Obtains a request interceptor from this list.

Parameters
index the index of the interceptor to obtain, 0 for first
Returns
  • the interceptor at the given index, or null if the index is out of range

public abstract int getRequestInterceptorCount ()

Obtains the current size of this list.

Returns
  • the number of request interceptors in this list

public abstract void removeRequestInterceptorByClass (Class clazz)

Removes all request interceptor of the specified class

Parameters
clazz the class of the instances to be removed.

public abstract 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 the list of request interceptors