package org.chenyang.http.impl.client;

import org.chenyang.http.annotation.Contract;
import org.chenyang.http.annotation.ThreadingBehavior;
import org.chenyang.http.client.protocol.RequestAcceptEncoding;
import org.chenyang.http.client.protocol.ResponseContentEncoding;
import org.chenyang.http.conn.ClientConnectionManager;
import org.chenyang.http.params.HttpParams;
import org.chenyang.http.protocol.BasicHttpProcessor;

/** @deprecated */
@Deprecated
@Contract(
   threading = ThreadingBehavior.SAFE_CONDITIONAL
)
public class ContentEncodingHttpClient extends DefaultHttpClient {
   public ContentEncodingHttpClient(ClientConnectionManager conman, HttpParams params) {
      super(conman, params);
   }

   public ContentEncodingHttpClient(HttpParams params) {
      this((ClientConnectionManager)null, params);
   }

   public ContentEncodingHttpClient() {
      this((HttpParams)null);
   }

   protected BasicHttpProcessor createHttpProcessor() {
      BasicHttpProcessor result = super.createHttpProcessor();
      result.addRequestInterceptor(new RequestAcceptEncoding());
      result.addResponseInterceptor(new ResponseContentEncoding());
      return result;
   }
}
