本文整理了Java中com.ning.http.client.AsyncHttpClientConfig.isAllowPoolingConnections()
方法的一些代码示例,展示了AsyncHttpClientConfig.isAllowPoolingConnections()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AsyncHttpClientConfig.isAllowPoolingConnections()
方法的具体详情如下:
包路径:com.ning.http.client.AsyncHttpClientConfig
类名称:AsyncHttpClientConfig
方法名:isAllowPoolingConnections
[英]Is pooling connections enabled.
[中]是否启用了池连接。
代码示例来源:origin: com.ning/async-http-client
allowPoolingConnections = prototype.isAllowPoolingConnections();
providerConfig = prototype.getAsyncHttpProviderConfig();
connectTimeout = prototype.getConnectTimeout();
ioThreadMultiplier = prototype.getIoThreadMultiplier();
maxRequestRetry = prototype.getMaxRequestRetry();
allowPoolingSslConnections = prototype.isAllowPoolingConnections();
hostnameVerifier = prototype.getHostnameVerifier();
strict302Handling = prototype.isStrict302Handling();
代码示例来源:origin: io.gatling/async-http-client
public static String keepAliveHeaderValue(AsyncHttpClientConfig config) {
return config.isAllowPoolingConnections() ? "keep-alive" : "close";
}
代码示例来源:origin: com.ning/async-http-client
if (channelPool == null && config.isAllowPoolingConnections()) {
channelPool = new DefaultChannelPool(config, nettyTimer);
} else if (channelPool == null) {
代码示例来源:origin: com.ning/async-http-client
boolean connect = method == HttpMethod.CONNECT;
boolean allowConnectionPooling = config.isAllowPoolingConnections() && (!isSecure(uri) || config.isAllowPoolingSslConnections());
代码示例来源:origin: Nike-Inc/riposte
private void verifyDefaultUnderlyingClientConfig(AsyncHttpClientHelper instance) {
AsyncHttpClientConfig config = instance.asyncHttpClient.getConfig();
assertThat(config.isAllowPoolingConnections()).isTrue();
assertThat(config.getMaxRequestRetry()).isEqualTo(0);
assertThat(config.getRequestTimeout()).isEqualTo(DEFAULT_REQUEST_TIMEOUT_MILLIS);
assertThat(config.getConnectionTTL()).isEqualTo(DEFAULT_POOLED_DOWNSTREAM_CONNECTION_TTL_MILLIS);
assertThat(Whitebox.getInternalState(instance.asyncHttpClient, "signatureCalculator")).isNull();
}
代码示例来源:origin: com.ning/async-http-client
this.poolingEnabled = config.isAllowPoolingConnections();
this.poolingSSLConnections = config.isAllowPoolingSslConnections();
代码示例来源:origin: spotify/async-google-pubsub-client
log.debug("pooled connection TTL: {}", config.getConnectionTTL());
log.debug("pooled connection idle timeout: {}", config.getPooledConnectionIdleTimeout());
log.debug("pooling connections: {}", config.isAllowPoolingConnections());
log.debug("pooling SSL connections: {}", config.isAllowPoolingSslConnections());
log.debug("user agent: {}", config.getUserAgent());
代码示例来源:origin: io.gatling/async-http-client
ConnectionManager(final GrizzlyAsyncHttpProvider provider,
final TCPNIOTransport transport,
final GrizzlyAsyncHttpProviderConfig providerConfig) {
ConnectionPool connectionPool;
this.provider = provider;
final AsyncHttpClientConfig config = provider.clientConfig;
if (config.isAllowPoolingConnections()) {
ConnectionPool pool = providerConfig != null ? providerConfig.getConnectionPool() : null;
if (pool != null) {
connectionPool = pool;
} else {
connectionPool = new GrizzlyConnectionPool((config));
}
} else {
connectionPool = new NonCachingPool();
}
pool = connectionPool;
connectionHandler = TCPNIOConnectorHandler.builder(transport).build();
final int maxConns = provider.clientConfig.getMaxConnections();
connectionMonitor = new ConnectionMonitor(maxConns);
}
代码示例来源:origin: io.gatling/async-http-client
allowPoolingConnections = prototype.isAllowPoolingConnections();
providerConfig = prototype.getAsyncHttpProviderConfig();
connectionTimeout = prototype.getConnectionTimeout();
ioThreadMultiplier = prototype.getIoThreadMultiplier();
maxRequestRetry = prototype.getMaxRequestRetry();
allowPoolingSslConnections = prototype.isAllowPoolingConnections();
removeQueryParamOnRedirect = prototype.isRemoveQueryParamOnRedirect();
hostnameVerifier = prototype.getHostnameVerifier();
代码示例来源:origin: javaee/grizzly-ahc
allowPoolingConnections = prototype.isAllowPoolingConnections();
providerConfig = prototype.getAsyncHttpProviderConfig();
connectTimeout = prototype.getConnectTimeout();
ioThreadMultiplier = prototype.getIoThreadMultiplier();
maxRequestRetry = prototype.getMaxRequestRetry();
allowPoolingSslConnections = prototype.isAllowPoolingConnections();
hostnameVerifier = prototype.getHostnameVerifier();
strict302Handling = prototype.isStrict302Handling();
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client
allowPoolingConnections = prototype.isAllowPoolingConnections();
providerConfig = prototype.getAsyncHttpProviderConfig();
connectTimeout = prototype.getConnectTimeout();
ioThreadMultiplier = prototype.getIoThreadMultiplier();
maxRequestRetry = prototype.getMaxRequestRetry();
allowPoolingSslConnections = prototype.isAllowPoolingConnections();
hostnameVerifier = prototype.getHostnameVerifier();
strict302Handling = prototype.isStrict302Handling();
代码示例来源:origin: io.gatling/async-http-client
if (channelPool == null && config.isAllowPoolingConnections()) {
channelPool = new DefaultChannelPool(config, nettyTimer);
} else if (channelPool == null) {
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client
this.poolingEnabled = config.isAllowPoolingConnections();
this.poolingSSLConnections = config.isAllowPoolingSslConnections();
代码示例来源:origin: javaee/grizzly-ahc
this.poolingEnabled = config.isAllowPoolingConnections();
this.poolingSSLConnections = config.isAllowPoolingSslConnections();
内容来源于网络,如有侵权,请联系作者删除!