com.ning.http.client.AsyncHttpClientConfig.getConnectTimeout()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(81)

本文整理了Java中com.ning.http.client.AsyncHttpClientConfig.getConnectTimeout()方法的一些代码示例,展示了AsyncHttpClientConfig.getConnectTimeout()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AsyncHttpClientConfig.getConnectTimeout()方法的具体详情如下:
包路径:com.ning.http.client.AsyncHttpClientConfig
类名称:AsyncHttpClientConfig
方法名:getConnectTimeout

AsyncHttpClientConfig.getConnectTimeout介绍

[英]Return the maximum time in millisecond an com.ning.http.client.AsyncHttpClient can wait when connecting to a remote host
[中]返回com的最大时间(毫秒)。宁。http。客户AsyncHttpClient在连接到远程主机时可以等待

代码示例

代码示例来源:origin: com.ning/async-http-client

urlConnection.setConnectTimeout(config.getConnectTimeout());

代码示例来源:origin: com.ning/async-http-client

: null);
final int cTimeout = config.getConnectTimeout();
try {
  c = cTimeout > 0

代码示例来源:origin: com.ning/async-http-client

allowPoolingConnections = prototype.isAllowPoolingConnections();
providerConfig = prototype.getAsyncHttpProviderConfig();
connectTimeout = prototype.getConnectTimeout();
pooledConnectionIdleTimeout = prototype.getPooledConnectionIdleTimeout();
readTimeout = prototype.getReadTimeout();

代码示例来源:origin: com.ning/async-http-client

if (config.getConnectTimeout() > 0)
  nettyConfig.addProperty("connectTimeoutMillis", config.getConnectTimeout());
for (Entry<String, Object> entry : nettyConfig.propertiesSet()) {
  String key = entry.getKey();

代码示例来源:origin: com.ning/async-http-client

final MultiEndpointPool.Builder<SocketAddress> builder
      = MultiEndpointPool.builder(SocketAddress.class)
      .connectTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .asyncPollTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .maxConnectionsTotal(config.getMaxConnections())
      .maxConnectionsPerEndpoint(config.getMaxConnectionsPerHost())
} else {
  pool = MultiEndpointPool.builder(SocketAddress.class)
      .connectTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .asyncPollTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .maxConnectionsTotal(config.getMaxConnections())
      .maxConnectionsPerEndpoint(config.getMaxConnectionsPerHost())

代码示例来源:origin: spotify/async-google-pubsub-client

log.debug("connect timeout: {}", config.getConnectTimeout());
log.debug("read timeout: {}", config.getReadTimeout());
log.debug("request timeout: {}", config.getRequestTimeout());

代码示例来源:origin: javaee/grizzly-ahc

: null);
final int cTimeout = config.getConnectTimeout();
try {
  c = cTimeout > 0

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client

: null);
final int cTimeout = config.getConnectTimeout();
try {
  c = cTimeout > 0

代码示例来源:origin: javaee/grizzly-ahc

allowPoolingConnections = prototype.isAllowPoolingConnections();
providerConfig = prototype.getAsyncHttpProviderConfig();
connectTimeout = prototype.getConnectTimeout();
pooledConnectionIdleTimeout = prototype.getPooledConnectionIdleTimeout();
readTimeout = prototype.getReadTimeout();

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client

allowPoolingConnections = prototype.isAllowPoolingConnections();
providerConfig = prototype.getAsyncHttpProviderConfig();
connectTimeout = prototype.getConnectTimeout();
pooledConnectionIdleTimeout = prototype.getPooledConnectionIdleTimeout();
readTimeout = prototype.getReadTimeout();

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client

final MultiEndpointPool.Builder<SocketAddress> builder
      = MultiEndpointPool.builder(SocketAddress.class)
      .connectTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .asyncPollTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .maxConnectionsTotal(config.getMaxConnections())
      .maxConnectionsPerEndpoint(config.getMaxConnectionsPerHost())
} else {
  pool = MultiEndpointPool.builder(SocketAddress.class)
      .connectTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .asyncPollTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .maxConnectionsTotal(config.getMaxConnections())
      .maxConnectionsPerEndpoint(config.getMaxConnectionsPerHost())

代码示例来源:origin: javaee/grizzly-ahc

final MultiEndpointPool.Builder<SocketAddress> builder
      = MultiEndpointPool.builder(SocketAddress.class)
      .connectTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .asyncPollTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .maxConnectionsTotal(config.getMaxConnections())
      .maxConnectionsPerEndpoint(config.getMaxConnectionsPerHost())
} else {
  pool = MultiEndpointPool.builder(SocketAddress.class)
      .connectTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .asyncPollTimeout(config.getConnectTimeout(), TimeUnit.MILLISECONDS)
      .maxConnectionsTotal(config.getMaxConnections())
      .maxConnectionsPerEndpoint(config.getMaxConnectionsPerHost())

相关文章

微信公众号

最新文章

更多