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

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

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

HttpClient.setCookieStore介绍

暂无

代码示例

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

client.setCookieStore(new HttpCookieStore.Empty());

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

/**
 * @param cookieStore The cookie store
 * @deprecated Use {@link HttpClient#setCookieStore(CookieStore)} on the HttpClient instance passed
 * to {@link #WebSocketClient(HttpClient)}
 */
@Deprecated
public void setCookieStore(CookieStore cookieStore)
{
  this.httpClient.setCookieStore(cookieStore);
}

代码示例来源:origin: org.eclipse.jetty.spdy/spdy-http-server

private void configureHttpClient(HttpClient httpClient)
{
  // Redirects must be proxied as is, not followed
  httpClient.setFollowRedirects(false);
  // Must not store cookies, otherwise cookies of different clients will mix
  httpClient.setCookieStore(new HttpCookieStore.Empty());
}

代码示例来源:origin: RusticiSoftware/TinCanJava

private static HttpClient httpClient() throws Exception {
  if (_httpClient == null ) {
    _httpClient = new HttpClient(new SslContextFactory());
    _httpClient.setConnectTimeout(TIMEOUT_CONNECT);
    _httpClient.setFollowRedirects(false);
    _httpClient.setCookieStore(new HttpCookieStore.Empty());
    _httpClient.start();
    _ourClient = true;
  }
  return _httpClient;
}

代码示例来源:origin: danielflower/app-runner

private HttpClient createClient() throws Exception {
  int selectors = Math.max(1, Runtime.getRuntime().availableProcessors() / 2);
  HttpClient client = new HttpClient(new HttpClientTransportOverHTTP(selectors), new SslContextFactory(true));
  client.setFollowRedirects(false);
  client.setCookieStore(new HttpCookieStore.Empty());
  client.setMaxConnectionsPerDestination(256);
  client.setAddressResolutionTimeout(15000);
  client.setConnectTimeout(15000);
  client.setIdleTimeout(idleTimeout);
  client.setUserAgentField(null);
  client.start();
  client.getContentDecoderFactories().clear();
  return client;
}

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

client.setCookieStore(new HttpCookieStore.Empty());

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

client.setCookieStore(new HttpCookieStore.Empty());

代码示例来源:origin: isucon/isucon5-qualify

private HttpClient client() {
 HttpField agent = new HttpField("User-Agent", config.agent);
 HttpClient httpClient = new HttpClient();
 httpClient.setFollowRedirects(false);
 httpClient.setMaxConnectionsPerDestination(MAX_CONNECTIONS_PER_DEST);
 httpClient.setMaxRequestsQueuedPerDestination(MAX_QUEUED_REQUESTS_PER_DEST);
 httpClient.setUserAgentField(agent);
 httpClient.setCookieStore(new HttpCookieStore.Empty());
 return httpClient;
}

代码示例来源:origin: isucon/isucon5-final

private HttpClient client() {
  HttpField agent = new HttpField("User-Agent", config.agent);
  // TODO: non-keepalived client connections
  HttpClient httpClient = new HttpClient();
  httpClient.setFollowRedirects(false);
  httpClient.setMaxConnectionsPerDestination(MAX_CONNECTIONS_PER_DEST);
  httpClient.setMaxRequestsQueuedPerDestination(MAX_QUEUED_REQUESTS_PER_DEST);
  httpClient.setUserAgentField(agent);
  httpClient.setCookieStore(new HttpCookieStore.Empty());
  return httpClient;
}

代码示例来源:origin: org.glassfish.jersey.connectors/jersey-jetty-connector

client.setCookieStore(new HttpCookieStore.Empty());

代码示例来源:origin: allegro/hermes

public HttpClient createClientForHttp2() {
  ExecutorService executor = executorFactory.getExecutorService("jetty-http2-client",
      configFactory.getIntProperty(CONSUMER_HTTP2_CLIENT_THREAD_POOL_SIZE),
      configFactory.getBooleanProperty(CONSUMER_HTTP2_CLIENT_THREAD_POOL_MONITORING));
  HTTP2Client h2Client = new HTTP2Client();
  h2Client.setExecutor(executor);
  HttpClientTransportOverHTTP2 transport = new HttpClientTransportOverHTTP2(h2Client);
  HttpClient client = new HttpClient(transport, createSslContextFactory());
  client.setMaxRequestsQueuedPerDestination(configFactory.getIntProperty(CONSUMER_INFLIGHT_SIZE));
  client.setCookieStore(new HttpCookieStore.Empty());
  return client;
}

代码示例来源:origin: allegro/hermes

public HttpClient createClientForHttp1(String name) {
  ExecutorService executor = executorFactory.getExecutorService(name,
      configFactory.getIntProperty(CONSUMER_HTTP_CLIENT_THREAD_POOL_SIZE),
      configFactory.getBooleanProperty(CONSUMER_HTTP_CLIENT_THREAD_POOL_MONITORING));
  HttpClient client = new HttpClient(createSslContextFactory());
  client.setMaxConnectionsPerDestination(configFactory.getIntProperty(CONSUMER_HTTP_CLIENT_MAX_CONNECTIONS_PER_DESTINATION));
  client.setMaxRequestsQueuedPerDestination(configFactory.getIntProperty(CONSUMER_INFLIGHT_SIZE));
  client.setExecutor(executor);
  client.setCookieStore(new HttpCookieStore.Empty());
  return client;
}

代码示例来源:origin: pl.allegro.tech.hermes/hermes-consumers

public HttpClient createClientForHttp2() {
  ExecutorService executor = executorFactory.getExecutorService("jetty-http2-client",
      configFactory.getIntProperty(CONSUMER_HTTP2_CLIENT_THREAD_POOL_SIZE),
      configFactory.getBooleanProperty(CONSUMER_HTTP2_CLIENT_THREAD_POOL_MONITORING));
  HTTP2Client h2Client = new HTTP2Client();
  h2Client.setExecutor(executor);
  HttpClientTransportOverHTTP2 transport = new HttpClientTransportOverHTTP2(h2Client);
  HttpClient client = new HttpClient(transport, createSslContextFactory());
  client.setMaxRequestsQueuedPerDestination(configFactory.getIntProperty(CONSUMER_INFLIGHT_SIZE));
  client.setCookieStore(new HttpCookieStore.Empty());
  return client;
}

代码示例来源:origin: pl.allegro.tech.hermes/hermes-consumers

public HttpClient createClientForHttp1(String name) {
  ExecutorService executor = executorFactory.getExecutorService(name,
      configFactory.getIntProperty(CONSUMER_HTTP_CLIENT_THREAD_POOL_SIZE),
      configFactory.getBooleanProperty(CONSUMER_HTTP_CLIENT_THREAD_POOL_MONITORING));
  HttpClient client = new HttpClient(createSslContextFactory());
  client.setMaxConnectionsPerDestination(configFactory.getIntProperty(CONSUMER_HTTP_CLIENT_MAX_CONNECTIONS_PER_DESTINATION));
  client.setMaxRequestsQueuedPerDestination(configFactory.getIntProperty(CONSUMER_INFLIGHT_SIZE));
  client.setExecutor(executor);
  client.setCookieStore(new HttpCookieStore.Empty());
  return client;
}

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

this.httpClient.setConnectTimeout(options.connectionTimeoutMillis);
this.httpClient.setMaxConnectionsPerDestination(options.maxConnectionsPerDestination);
this.httpClient.setCookieStore(new HttpCookieStore.Empty());
if(options.proxyHost != null) {
 ProxyConfiguration proxyConfig = httpClient.getProxyConfiguration();

代码示例来源:origin: HtmlUnit/htmlunit

client_ = new WebSocketClient();
client_.getHttpClient().setCookieStore(new WebSocketCookieStore(webClient));

代码示例来源:origin: allegro/hermes

@BeforeClass
public static void setupEnvironment() throws Exception {
  wireMockServer = new WireMockServer(ENDPOINT_PORT);
  wireMockServer.start();
  client = new HttpClient();
  client.setCookieStore(new HttpCookieStore.Empty());
  client.setConnectTimeout(1000);
  client.setIdleTimeout(1000);
  client.start();
}

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

httpClient.setCookieStore(new HttpCookieStore.Empty());

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

httpClient.setCookieStore(new HttpCookieStore.Empty());

相关文章

HttpClient类方法