org.eclipse.jetty.client.HttpClient.setResponseBufferSize()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(134)

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

HttpClient.setResponseBufferSize介绍

暂无

代码示例

代码示例来源:origin: labsai/EDDI

@Provides
@Singleton
public HttpClient provideHttpClient(ExecutorService executorService,
                  @Named("httpClient.maxConnectionsQueued") Integer maxConnectionsQueued,
                  @Named("httpClient.maxConnectionPerRoute") Integer maxConnectionPerRoute,
                  @Named("httpClient.requestBufferSize") Integer requestBufferSize,
                  @Named("httpClient.responseBufferSize") Integer responseBufferSize,
                  @Named("httpClient.maxRedirects") Integer maxRedirects,
                  @Named("httpClient.trustAllCertificates") Boolean trustAllCertificates) {
  try {
    SslContextFactory sslContextFactory = new SslContextFactory();
    sslContextFactory.setTrustAll(trustAllCertificates);
    HttpClient httpClient = new HttpClient(sslContextFactory);
    httpClient.setExecutor(executorService);
    httpClient.setMaxConnectionsPerDestination(maxConnectionsQueued);
    httpClient.setMaxRequestsQueuedPerDestination(maxConnectionPerRoute);
    httpClient.setRequestBufferSize(requestBufferSize);
    httpClient.setResponseBufferSize(responseBufferSize);
    httpClient.setMaxRedirects(maxRedirects);
    httpClient.start();
    registerHttpClientShutdownHook(httpClient);
    return httpClient;
  } catch (Exception e) {
    System.out.println(Arrays.toString(e.getStackTrace()));
    throw new RuntimeException(e.getLocalizedMessage(), e);
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

client.setResponseBufferSize(Integer.parseInt(t));

代码示例来源:origin: org.apache.pulsar/pulsar-proxy

client.setResponseBufferSize(Integer.parseInt(value));

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

_client.setResponseBufferSize(Integer.parseInt(_responseBufferSize));

代码示例来源:origin: org.eclipse.jetty/jetty-proxy

client.setResponseBufferSize(Integer.parseInt(value));

代码示例来源:origin: org.attribyte/attribyte-http

this.httpClient.setResponseBufferSize(options.responseBufferSize);
this.httpClient.setIdleTimeout(options.getIntProperty("idleTimeout", 0));
this.httpClient.setAddressResolutionTimeout(options.getIntProperty("addressResolutionTimeout", 15000));

代码示例来源:origin: airlift/airlift

httpClient.setResponseBufferSize(toIntExact(config.getResponseBufferSize().toBytes()));

代码示例来源:origin: com.proofpoint.platform/http-client

httpClient.setResponseBufferSize(toIntExact(config.getResponseBufferSize().toBytes()));

相关文章

HttpClient类方法