当前位置: 首页>>代码示例>>Java>>正文


Java Executor.auth方法代码示例

本文整理汇总了Java中org.apache.http.client.fluent.Executor.auth方法的典型用法代码示例。如果您正苦于以下问题:Java Executor.auth方法的具体用法?Java Executor.auth怎么用?Java Executor.auth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.http.client.fluent.Executor的用法示例。


在下文中一共展示了Executor.auth方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: reload

import org.apache.http.client.fluent.Executor; //导入方法依赖的package包/类
public void reload(boolean initial) {
    if ( initial ) {
        Runnable onChange = new Runnable() {
            @Override
            public void run() {
                reload(false);
            }
        };

        INDEX_URL.addCallback(onChange);
        INDEX_USER.addCallback(onChange);
        INDEX_PASS.addCallback(onChange);
    }

    log.info("Using docker index url [{}] and user [{}]", INDEX_URL.get(), INDEX_USER.get());

    Executor executor = Executor.newInstance();
    if ( ! StringUtils.isBlank(INDEX_USER.get()) ) {
        executor = executor.auth(INDEX_USER.get(), INDEX_PASS.get());
    }

    this.executor = executor;
}
 
开发者ID:cloudnautique,项目名称:cloud-cattle,代码行数:24,代码来源:DockerClient.java

示例2: invokeRequest

import org.apache.http.client.fluent.Executor; //导入方法依赖的package包/类
public static HttpResponse invokeRequest(Request request, String username, String password, boolean useSSL) throws ClientProtocolException, IOException, KeyManagementException, NoSuchAlgorithmException {
	Executor executor = getExecutor(useSSL);
	executor = executor.auth(username, password);

	HttpResponse httpResponse = invokeRequest(request, executor);
	return httpResponse;
}
 
开发者ID:CognitiveBuild,项目名称:Chatbot,代码行数:8,代码来源:Utility.java

示例3: createExecutor

import org.apache.http.client.fluent.Executor; //导入方法依赖的package包/类
private static Executor createExecutor(ClientConfig config) {
    Executor retval = Executor.newInstance();
    retval.auth(config.getEndpointHost(), config.getUsername(), config.getPassword());
    if (config.hasProxy() && config.isProxyAuthenticated()) {
        retval.auth(config.getProxyHost(), config.getProxyUsername(), config.getProxyPassword());
    }
    return retval;
}
 
开发者ID:woki,项目名称:adyen-api,代码行数:9,代码来源:Endpoint.java

示例4: setupProxy

import org.apache.http.client.fluent.Executor; //导入方法依赖的package包/类
public static Executor setupProxy(Executor exec, URI uri) {
	for (IProxyData d : proxyService.select(uri)) {
		exec.auth(new HttpHost(d.getHost(), d.getPort()), getCredentials(d));
		exec.authPreemptiveProxy(new HttpHost(d.getHost(), d.getPort()));
		break;
	}
	executors.put(exec, uri);
	return exec;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:10,代码来源:HttpUtils.java


注:本文中的org.apache.http.client.fluent.Executor.auth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。