Java 类org.apache.commons.httpclient.auth.AuthChallengeProcessor 实例源码

项目:ridire-cpi    文件:CrawlerManager.java   
@Create
public void create() {
    Protocol.registerProtocol("https", new Protocol("https",
            new EasySSLProtocolSocketFactory(), 8443));
    this.httpClient = new HttpClient();
    this.httpClient.getParams().setAuthenticationPreemptive(true);
    Credentials defaultcreds = new UsernamePasswordCredentials("admin",
            this.entityManager.find(CommandParameter.class,
                    CommandParameter.HERITRIX_ADMINPW_KEY)
                    .getCommandValue());
    this.httpClient.getState().setCredentials(
            new AuthScope(AuthScope.ANY_SCHEME, AuthScope.ANY_PORT,
                    AuthScope.ANY_REALM), defaultcreds);
    this.engineUri = this.entityManager.find(Parameter.class,
            Parameter.ENGINE_URI.getKey()).getValue();
    Logger httpClientlogger = Logger.getLogger(this.httpClient.getClass());
    httpClientlogger.setLevel(Level.ERROR);
    Logger authChallengeProcessorLogger = Logger
            .getLogger(AuthChallengeProcessor.class);
    authChallengeProcessorLogger.setLevel(Level.ERROR);
    Logger httpMethodBaseLogger = Logger.getLogger(HttpMethodBase.class);
    httpMethodBaseLogger.setLevel(Level.ERROR);
    this.jobsDir = this.entityManager.find(Parameter.class,
            Parameter.JOBS_DIR.getKey()).getValue();
}
项目:ridire-cpi    文件:JobDBDataUpdater.java   
private void create() {
    Protocol.registerProtocol("https", new Protocol("https",
            new EasySSLProtocolSocketFactory(), 8443));
    this.httpClient = new HttpClient();
    this.httpClient.getParams().setAuthenticationPreemptive(true);
    Credentials defaultcreds = new UsernamePasswordCredentials("admin",
            this.entityManager.find(CommandParameter.class,
                    CommandParameter.HERITRIX_ADMINPW_KEY)
                    .getCommandValue());
    this.httpClient.getState().setCredentials(
            new AuthScope(AuthScope.ANY_SCHEME, AuthScope.ANY_PORT,
                    AuthScope.ANY_REALM), defaultcreds);
    this.engineUri = this.entityManager.find(Parameter.class,
            Parameter.ENGINE_URI.getKey()).getValue();
    Logger httpClientlogger = Logger.getLogger(this.httpClient.getClass());
    httpClientlogger.setLevel(Level.ERROR);
    Logger authChallengeProcessorLogger = Logger
            .getLogger(AuthChallengeProcessor.class);
    authChallengeProcessorLogger.setLevel(Level.ERROR);
    Logger httpMethodBaseLogger = Logger.getLogger(HttpMethodBase.class);
    httpMethodBaseLogger.setLevel(Level.ERROR);
    this.jobsDir = this.entityManager.find(Parameter.class,
            Parameter.JOBS_DIR.getKey()).getValue();
}
项目:lib-commons-httpclient    文件:HttpMethodDirector.java   
public HttpMethodDirector(
    final HttpConnectionManager connectionManager,
    final HostConfiguration hostConfiguration,
    final HttpClientParams params,
    final HttpState state
) {
    super();
    this.connectionManager = connectionManager;
    this.hostConfiguration = hostConfiguration;
    this.params = params;
    this.state = state;
    this.authProcessor = new AuthChallengeProcessor(this.params);
}
项目:http4e    文件:HttpMethodDirector.java   
public HttpMethodDirector(
    final HttpConnectionManager connectionManager,
    final HostConfiguration hostConfiguration,
    final HttpClientParams params,
    final HttpState state
) {
    super();
    this.connectionManager = connectionManager;
    this.hostConfiguration = hostConfiguration;
    this.params = params;
    this.state = state;
    this.authProcessor = new AuthChallengeProcessor(this.params);
}
项目:httpclient3-ntml    文件:HttpMethodDirector.java   
public HttpMethodDirector(
    final HttpConnectionManager connectionManager,
    final HostConfiguration hostConfiguration,
    final HttpClientParams params,
    final HttpState state
) {
    super();
    this.connectionManager = connectionManager;
    this.hostConfiguration = hostConfiguration;
    this.params = params;
    this.state = state;
    this.authProcessor = new AuthChallengeProcessor(this.params);
}