org.apache.http.protocol
Interface HttpRequestInterceptorList

All Known Implementing Classes:
BasicHttpProcessor

public interface HttpRequestInterceptorList

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
Version:
$Revision: 503400 $
Author:
Roland Weber

Method Summary
 void addRequestInterceptor(HttpRequestInterceptor itcp)
          Appends a request interceptor to this list.
 void clearRequestInterceptors()
          Removes all request interceptors from this list.
 HttpRequestInterceptor getRequestInterceptor(int index)
          Obtains a request interceptor from this list.
 int getRequestInterceptorCount()
          Obtains the current size of this list.
 void setInterceptors(java.util.List itcps)
          Sets the request interceptors in this list.
 

Method Detail

addRequestInterceptor

void addRequestInterceptor(HttpRequestInterceptor itcp)
Appends a request interceptor to this list.

Parameters:
itcp - the request interceptor to add, or null to do nothing

getRequestInterceptorCount

int getRequestInterceptorCount()
Obtains the current size of this list.

Returns:
the number of request interceptors in this list

getRequestInterceptor

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

clearRequestInterceptors

void clearRequestInterceptors()
Removes all request interceptors from this list.


setInterceptors

void setInterceptors(java.util.List itcps)
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:
itcps - the list of request interceptors


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.