Java 类org.apache.http.client.protocol.RequestProxyAuthentication 实例源码

项目:lams    文件:ProxyClient.java   
public ProxyClient(final HttpParams params) {
    super();
    if (params == null) {
        throw new IllegalArgumentException("HTTP parameters may not be null");
    }
    this.httpProcessor = new ImmutableHttpProcessor(new HttpRequestInterceptor[] {
            new RequestContent(),
            new RequestTargetHost(),
            new RequestClientConnControl(),
            new RequestUserAgent(),
            new RequestProxyAuthentication()
    } );
    this.requestExec = new HttpRequestExecutor();
    this.proxyAuthStrategy = new ProxyAuthenticationStrategy();
    this.authenticator = new HttpAuthenticator();
    this.proxyAuthState = new AuthState();
    this.authSchemeRegistry = new AuthSchemeRegistry();
    this.authSchemeRegistry.register(AuthPolicy.BASIC, new BasicSchemeFactory());
    this.authSchemeRegistry.register(AuthPolicy.DIGEST, new DigestSchemeFactory());
    this.authSchemeRegistry.register(AuthPolicy.NTLM, new NTLMSchemeFactory());
    this.authSchemeRegistry.register(AuthPolicy.SPNEGO, new SPNegoSchemeFactory());
    this.authSchemeRegistry.register(AuthPolicy.KERBEROS, new KerberosSchemeFactory());
    this.reuseStrategy = new DefaultConnectionReuseStrategy();
    this.params = params;
}
项目:lams    文件:DefaultHttpClient.java   
/**
* Create the processor with the following interceptors:
* <ul>
* <li>{@link RequestDefaultHeaders}</li>
* <li>{@link RequestContent}</li>
* <li>{@link RequestTargetHost}</li>
* <li>{@link RequestClientConnControl}</li>
* <li>{@link RequestUserAgent}</li>
* <li>{@link RequestExpectContinue}</li>
* <li>{@link RequestAddCookies}</li>
* <li>{@link ResponseProcessCookies}</li>
* <li>{@link RequestAuthCache}</li>
* <li>{@link RequestTargetAuthentication}</li>
* <li>{@link RequestProxyAuthentication}</li>
* </ul>
* <p>
* @return the processor with the added interceptors.
*/
@Override
protected BasicHttpProcessor createHttpProcessor() {
    BasicHttpProcessor httpproc = new BasicHttpProcessor();
    httpproc.addInterceptor(new RequestDefaultHeaders());
    // Required protocol interceptors
    httpproc.addInterceptor(new RequestContent());
    httpproc.addInterceptor(new RequestTargetHost());
    // Recommended protocol interceptors
    httpproc.addInterceptor(new RequestClientConnControl());
    httpproc.addInterceptor(new RequestUserAgent());
    httpproc.addInterceptor(new RequestExpectContinue());
    // HTTP state management interceptors
    httpproc.addInterceptor(new RequestAddCookies());
    httpproc.addInterceptor(new ResponseProcessCookies());
    // HTTP authentication interceptors
    httpproc.addInterceptor(new RequestAuthCache());
    httpproc.addInterceptor(new RequestTargetAuthentication());
    httpproc.addInterceptor(new RequestProxyAuthentication());
    return httpproc;
}
项目:purecloud-iot    文件:DefaultHttpClient.java   
/**
* Create the processor with the following interceptors:
* <ul>
* <li>{@link RequestDefaultHeaders}</li>
* <li>{@link RequestContent}</li>
* <li>{@link RequestTargetHost}</li>
* <li>{@link RequestClientConnControl}</li>
* <li>{@link RequestUserAgent}</li>
* <li>{@link RequestExpectContinue}</li>
* <li>{@link RequestAddCookies}</li>
* <li>{@link ResponseProcessCookies}</li>
* <li>{@link RequestAuthCache}</li>
* <li>{@link RequestTargetAuthentication}</li>
* <li>{@link RequestProxyAuthentication}</li>
* </ul>
* <p>
* @return the processor with the added interceptors.
*/
@Override
protected BasicHttpProcessor createHttpProcessor() {
    final BasicHttpProcessor httpproc = new BasicHttpProcessor();
    httpproc.addInterceptor(new RequestDefaultHeaders());
    // Required protocol interceptors
    httpproc.addInterceptor(new RequestContent());
    httpproc.addInterceptor(new RequestTargetHost());
    // Recommended protocol interceptors
    httpproc.addInterceptor(new RequestClientConnControl());
    httpproc.addInterceptor(new RequestUserAgent());
    httpproc.addInterceptor(new RequestExpectContinue());
    // HTTP state management interceptors
    httpproc.addInterceptor(new RequestAddCookies());
    httpproc.addInterceptor(new ResponseProcessCookies());
    // HTTP authentication interceptors
    httpproc.addInterceptor(new RequestAuthCache());
    httpproc.addInterceptor(new RequestTargetAuthentication());
    httpproc.addInterceptor(new RequestProxyAuthentication());
    return httpproc;
}
项目:cJUnit-mc626    文件:DefaultHttpClient.java   
@Override
protected BasicHttpProcessor createHttpProcessor() {
    BasicHttpProcessor httpproc = new BasicHttpProcessor();
    httpproc.addInterceptor(new RequestDefaultHeaders());
    // Required protocol interceptors
    httpproc.addInterceptor(new RequestContent());
    httpproc.addInterceptor(new RequestTargetHost());
    // Recommended protocol interceptors
    httpproc.addInterceptor(new RequestClientConnControl());
    httpproc.addInterceptor(new RequestUserAgent());
    httpproc.addInterceptor(new RequestExpectContinue());
    // HTTP state management interceptors
    httpproc.addInterceptor(new RequestAddCookies());
    httpproc.addInterceptor(new ResponseProcessCookies());
    // HTTP authentication interceptors
    httpproc.addInterceptor(new RequestTargetAuthentication());
    httpproc.addInterceptor(new RequestProxyAuthentication());
    return httpproc;
}