Java 类org.apache.http.client.ConnectionBackoffStrategy 实例源码

项目:smarti    文件:RocketChatEndpoint.java   
public RocketChatEndpoint(
        @Value("${rocketchat.proxy.hostname:}") String proxyHostname,
        @Value("${rocketchat.proxy.port:80}") int proxyPort,
        @Value("${rocketchat.proxy.scheme:http}") String proxyScheme
) {

    httpClientBuilder = HttpClientBuilder.create()
            .setRetryHandler((exception, executionCount, context) -> executionCount < 3)
            .setConnectionBackoffStrategy(new ConnectionBackoffStrategy() {
                @Override
                public boolean shouldBackoff(Throwable t) {
                    return t instanceof IOException;
                }

                @Override
                public boolean shouldBackoff(HttpResponse resp) {
                    return false;
                }
            })
            .setUserAgent("Smarti/0.0 Rocket.Chat-Endpoint/0.1");

    if(StringUtils.isNotBlank(proxyHostname)) {
        httpClientBuilder.setProxy(new HttpHost(proxyHostname, proxyPort, proxyScheme));
    }
}
项目:remote-files-sync    文件:BackoffStrategyExec.java   
public BackoffStrategyExec(
        final ClientExecChain requestExecutor,
        final ConnectionBackoffStrategy connectionBackoffStrategy,
        final BackoffManager backoffManager) {
    super();
    Args.notNull(requestExecutor, "HTTP client request executor");
    Args.notNull(connectionBackoffStrategy, "Connection backoff strategy");
    Args.notNull(backoffManager, "Backoff manager");
    this.requestExecutor = requestExecutor;
    this.connectionBackoffStrategy = connectionBackoffStrategy;
    this.backoffManager = backoffManager;
}
项目:purecloud-iot    文件:BackoffStrategyExec.java   
public BackoffStrategyExec(
        final ClientExecChain requestExecutor,
        final ConnectionBackoffStrategy connectionBackoffStrategy,
        final BackoffManager backoffManager) {
    super();
    Args.notNull(requestExecutor, "HTTP client request executor");
    Args.notNull(connectionBackoffStrategy, "Connection backoff strategy");
    Args.notNull(backoffManager, "Backoff manager");
    this.requestExecutor = requestExecutor;
    this.connectionBackoffStrategy = connectionBackoffStrategy;
    this.backoffManager = backoffManager;
}
项目:Visit    文件:BackoffStrategyExec.java   
public BackoffStrategyExec(
        final ClientExecChain requestExecutor,
        final ConnectionBackoffStrategy connectionBackoffStrategy,
        final BackoffManager backoffManager) {
    super();
    Args.notNull(requestExecutor, "HTTP client request executor");
    Args.notNull(connectionBackoffStrategy, "Connection backoff strategy");
    Args.notNull(backoffManager, "Backoff manager");
    this.requestExecutor = requestExecutor;
    this.connectionBackoffStrategy = connectionBackoffStrategy;
    this.backoffManager = backoffManager;
}
项目:ZTLib    文件:BackoffStrategyExec.java   
public BackoffStrategyExec(
        final ClientExecChain requestExecutor,
        final ConnectionBackoffStrategy connectionBackoffStrategy,
        final BackoffManager backoffManager) {
    super();
    Args.notNull(requestExecutor, "HTTP client request executor");
    Args.notNull(connectionBackoffStrategy, "Connection backoff strategy");
    Args.notNull(backoffManager, "Backoff manager");
    this.requestExecutor = requestExecutor;
    this.connectionBackoffStrategy = connectionBackoffStrategy;
    this.backoffManager = backoffManager;
}
项目:springboot-shiro-cas-mybatis    文件:SimpleHttpClientFactoryBean.java   
public ConnectionBackoffStrategy getConnectionBackoffStrategy() {
    return this.connectionBackoffStrategy;
}
项目:springboot-shiro-cas-mybatis    文件:SimpleHttpClientFactoryBean.java   
public void setConnectionBackoffStrategy(final ConnectionBackoffStrategy connectionBackoffStrategy) {
    this.connectionBackoffStrategy = connectionBackoffStrategy;
}
项目:springboot-shiro-cas-mybatis    文件:SimpleHttpClientFactoryBean.java   
public ConnectionBackoffStrategy getConnectionBackoffStrategy() {
    return this.connectionBackoffStrategy;
}
项目:springboot-shiro-cas-mybatis    文件:SimpleHttpClientFactoryBean.java   
public void setConnectionBackoffStrategy(final ConnectionBackoffStrategy connectionBackoffStrategy) {
    this.connectionBackoffStrategy = connectionBackoffStrategy;
}
项目:cas-5.1.0    文件:SimpleHttpClientFactoryBean.java   
public ConnectionBackoffStrategy getConnectionBackoffStrategy() {
    return this.connectionBackoffStrategy;
}
项目:cas-5.1.0    文件:SimpleHttpClientFactoryBean.java   
public void setConnectionBackoffStrategy(final ConnectionBackoffStrategy connectionBackoffStrategy) {
    this.connectionBackoffStrategy = connectionBackoffStrategy;
}
项目:cas-server-4.2.1    文件:SimpleHttpClientFactoryBean.java   
public ConnectionBackoffStrategy getConnectionBackoffStrategy() {
    return this.connectionBackoffStrategy;
}
项目:cas-server-4.2.1    文件:SimpleHttpClientFactoryBean.java   
public void setConnectionBackoffStrategy(final ConnectionBackoffStrategy connectionBackoffStrategy) {
    this.connectionBackoffStrategy = connectionBackoffStrategy;
}
项目:lams    文件:AbstractHttpClient.java   
public synchronized final ConnectionBackoffStrategy getConnectionBackoffStrategy() {
    return connectionBackoffStrategy;
}
项目:lams    文件:AbstractHttpClient.java   
public synchronized void setConnectionBackoffStrategy(final ConnectionBackoffStrategy strategy) {
    connectionBackoffStrategy = strategy;
}
项目:remote-files-sync    文件:HttpClientBuilder.java   
/**
 * Assigns {@link ConnectionBackoffStrategy} instance.
 */
public final HttpClientBuilder setConnectionBackoffStrategy(
        final ConnectionBackoffStrategy connectionBackoffStrategy) {
    this.connectionBackoffStrategy = connectionBackoffStrategy;
    return this;
}
项目:cas4.1.9    文件:SimpleHttpClientFactoryBean.java   
public ConnectionBackoffStrategy getConnectionBackoffStrategy() {
    return this.connectionBackoffStrategy;
}
项目:cas4.1.9    文件:SimpleHttpClientFactoryBean.java   
public void setConnectionBackoffStrategy(final ConnectionBackoffStrategy connectionBackoffStrategy) {
    this.connectionBackoffStrategy = connectionBackoffStrategy;
}
项目:purecloud-iot    文件:AbstractHttpClient.java   
public synchronized final ConnectionBackoffStrategy getConnectionBackoffStrategy() {
    return connectionBackoffStrategy;
}
项目:purecloud-iot    文件:AbstractHttpClient.java   
public synchronized void setConnectionBackoffStrategy(final ConnectionBackoffStrategy strategy) {
    connectionBackoffStrategy = strategy;
}
项目:purecloud-iot    文件:HttpClientBuilder.java   
/**
 * Assigns {@link ConnectionBackoffStrategy} instance.
 */
public final HttpClientBuilder setConnectionBackoffStrategy(
        final ConnectionBackoffStrategy connectionBackoffStrategy) {
    this.connectionBackoffStrategy = connectionBackoffStrategy;
    return this;
}
项目:purecloud-iot    文件:TestDefaultBackoffStrategy.java   
@Test
public void isABackoffStrategy() {
    assertTrue(impl instanceof ConnectionBackoffStrategy);
}
项目:Visit    文件:HttpClientBuilder.java   
/**
 * Assigns {@link ConnectionBackoffStrategy} instance.
 */
public final HttpClientBuilder setConnectionBackoffStrategy(
        final ConnectionBackoffStrategy connectionBackoffStrategy) {
    this.connectionBackoffStrategy = connectionBackoffStrategy;
    return this;
}
项目:ZTLib    文件:HttpClientBuilder.java   
/**
 * Assigns {@link ConnectionBackoffStrategy} instance.
 */
public final HttpClientBuilder setConnectionBackoffStrategy(
        final ConnectionBackoffStrategy connectionBackoffStrategy) {
    this.connectionBackoffStrategy = connectionBackoffStrategy;
    return this;
}