1/*2 * ====================================================================3 * Licensed to the Apache Software Foundation (ASF) under one4 * or more contributor license agreements. See the NOTICE file5 * distributed with this work for additional information6 * regarding copyright ownership. The ASF licenses this file7 * to you under the Apache License, Version 2.0 (the8 * "License"); you may not use this file except in compliance9 * with the License. You may obtain a copy of the License at10 *11 * http://www.apache.org/licenses/LICENSE-2.012 *13 * Unless required by applicable law or agreed to in writing,14 * software distributed under the License is distributed on an15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY16 * KIND, either express or implied. See the License for the17 * specific language governing permissions and limitations18 * under the License.19 * ====================================================================20 *21 * This software consists of voluntary contributions made by many22 * individuals on behalf of the Apache Software Foundation. For more23 * information on the Apache Software Foundation, please see24 * <http://www.apache.org/>.25 *26 */2728package org.apache.http.protocol;
2930import java.util.List;
3132import org.apache.http.HttpResponseInterceptor;
3334/**35 * Provides access to an ordered list of response interceptors.36 * Lists are expected to be built upfront and used read-only afterwards37 * for {@link HttpProcessor processing}.38 *39 * @since 4.040 *41 * @deprecated (4.3)42 */43 @Deprecated
44publicinterfaceHttpResponseInterceptorList {
4546/**47 * Appends a response interceptor to this list.48 *49 * @param interceptor the response interceptor to add50 */51void addResponseInterceptor(HttpResponseInterceptor interceptor);
5253/**54 * Inserts a response interceptor at the specified index.55 *56 * @param interceptor the response interceptor to add57 * @param index the index to insert the interceptor at58 */59void addResponseInterceptor(HttpResponseInterceptor interceptor, int index);
6061/**62 * Obtains the current size of this list.63 *64 * @return the number of response interceptors in this list65 */66int getResponseInterceptorCount();
6768/**69 * Obtains a response interceptor from this list.70 *71 * @param index the index of the interceptor to obtain,72 * 0 for first73 *74 * @return the interceptor at the given index, or75 * {@code null} if the index is out of range76 */77HttpResponseInterceptor getResponseInterceptor(int index);
7879/**80 * Removes all response interceptors from this list.81 */82void clearResponseInterceptors();
8384/**85 * Removes all response interceptor of the specified class86 *87 * @param clazz the class of the instances to be removed.88 */89void removeResponseInterceptorByClass(Class<? extends HttpResponseInterceptor> clazz);
9091/**92 * Sets the response interceptors in this list.93 * This list will be cleared and re-initialized to contain94 * all response interceptors from the argument list.95 * If the argument list includes elements that are not response96 * interceptors, the behavior is implementation dependent.97 *98 * @param list the list of response interceptors99 */100void setInterceptors(List<?> list);
101102 }
103