本文整理了Java中org.eclipse.jetty.client.HttpClient.setRequestBufferSize()
方法的一些代码示例,展示了HttpClient.setRequestBufferSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpClient.setRequestBufferSize()
方法的具体详情如下:
包路径:org.eclipse.jetty.client.HttpClient
类名称:HttpClient
方法名:setRequestBufferSize
暂无
代码示例来源:origin: apache/incubator-druid
httpClient.setMaxRequestsQueuedPerDestination(config.getNumRequestsQueued());
httpClient.setConnectTimeout(CLIENT_CONNECT_TIMEOUT_MILLIS);
httpClient.setRequestBufferSize(config.getRequestBuffersize());
final QueuedThreadPool pool = new QueuedThreadPool(config.getNumMaxThreads());
pool.setName(JettyHttpClientModule.class.getSimpleName() + "-threadPool-" + pool.hashCode());
代码示例来源:origin: sixt/ja-micro
private HttpClient createHttpClient() {
//Allow ssl by default
SslContextFactory sslContextFactory = new SslContextFactory();
//Don't exclude RSA because Sixt needs them, dammit!
sslContextFactory.setExcludeCipherSuites("");
HttpClient client = new HttpClient(sslContextFactory);
client.setFollowRedirects(false);
client.setMaxConnectionsPerDestination(16);
client.setRequestBufferSize(65536);
client.setConnectTimeout(FeatureFlags.getHttpConnectTimeout(serviceProperties));
client.setAddressResolutionTimeout(FeatureFlags.getHttpAddressResolutionTimeout(serviceProperties));
//You can set more restrictive timeouts per request, but not less, so
// we set the maximum timeout of 1 hour here.
client.setIdleTimeout(60 * 60 * 1000);
try {
client.start();
} catch (Exception e) {
logger.error("Error building http client", e);
}
return client;
}
代码示例来源: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.setRequestBufferSize(Integer.parseInt(t));
代码示例来源:origin: org.apache.pulsar/pulsar-proxy
client.setRequestBufferSize(Integer.parseInt(value));
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
_client.setRequestBufferSize(Integer.parseInt(_requestBufferSize));
代码示例来源:origin: org.eclipse.jetty/jetty-proxy
client.setRequestBufferSize(Integer.parseInt(value));
代码示例来源:origin: io.druid/druid-server
httpClient.setMaxRequestsQueuedPerDestination(config.getNumRequestsQueued());
httpClient.setConnectTimeout(CLIENT_CONNECT_TIMEOUT);
httpClient.setRequestBufferSize(config.getRequestBuffersize());
final QueuedThreadPool pool = new QueuedThreadPool(config.getNumMaxThreads());
pool.setName(JettyHttpClientModule.class.getSimpleName() + "-threadPool-" + pool.hashCode());
代码示例来源:origin: org.apache.druid/druid-server
httpClient.setMaxRequestsQueuedPerDestination(config.getNumRequestsQueued());
httpClient.setConnectTimeout(CLIENT_CONNECT_TIMEOUT_MILLIS);
httpClient.setRequestBufferSize(config.getRequestBuffersize());
final QueuedThreadPool pool = new QueuedThreadPool(config.getNumMaxThreads());
pool.setName(JettyHttpClientModule.class.getSimpleName() + "-threadPool-" + pool.hashCode());
代码示例来源:origin: org.attribyte/attribyte-http
this.httpClient.setRequestBufferSize(options.requestBufferSize);
this.httpClient.setResponseBufferSize(options.responseBufferSize);
this.httpClient.setIdleTimeout(options.getIntProperty("idleTimeout", 0));
代码示例来源:origin: airlift/airlift
httpClient.setRequestBufferSize(toIntExact(config.getRequestBufferSize().toBytes()));
httpClient.setResponseBufferSize(toIntExact(config.getResponseBufferSize().toBytes()));
代码示例来源:origin: com.proofpoint.platform/http-client
httpClient.setRequestBufferSize(toIntExact(config.getRequestBufferSize().toBytes()));
httpClient.setResponseBufferSize(toIntExact(config.getResponseBufferSize().toBytes()));
内容来源于网络,如有侵权,请联系作者删除!