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

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

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

HttpClient.getExecutor介绍

暂无

代码示例

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

@Override
public Executor getExecutor()
{
  return httpClient.getExecutor();
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

@Override
  public void failed(final Throwable x)
  {
    client.getExecutor().execute(new Runnable()
    {
      @Override
      public void run()
      {
        abort(x);
      }
    });
  }
};

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

@Override
  public void failed(final Throwable x)
  {
    client.getExecutor().execute(new Runnable()
    {
      @Override
      public void run()
      {
        abort(x);
      }
    });
  }
};

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

protected ClientSelectorManager(HttpClient client, int selectors)
{
  super(client.getExecutor(), client.getScheduler(), selectors);
  this.client = client;
}

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

@Override
protected void onContinue(HttpServletRequest clientRequest, Request proxyRequest)
{
  super.onContinue(clientRequest, proxyRequest);
  Runnable action = (Runnable)proxyRequest.getAttributes().get(CONTINUE_ACTION_ATTRIBUTE);
  Executor executor = getHttpClient().getExecutor();
  executor.execute(action);
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

protected SelectorManager newSelectorManager()
{
  return new ClientSelectorManager(getExecutor(), getScheduler());
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

protected SslConnection newSslConnection(HttpClient httpClient, EndPoint endPoint, SSLEngine engine)
{
  return new SslConnection(httpClient.getByteBufferPool(), httpClient.getExecutor(), endPoint, engine);
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

protected SelectorManager newSelectorManager()
{
  return new ClientSelectorManager(getExecutor(), getScheduler());
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

protected SslConnection newSslConnection(HttpClient httpClient, EndPoint endPoint, SSLEngine engine)
{
  return new SslConnection(httpClient.getByteBufferPool(), httpClient.getExecutor(), endPoint, engine);
}

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

@Override
  public org.eclipse.jetty.io.Connection newConnection(EndPoint endPoint, Map<String, Object> context) throws IOException
  {
    HttpDestination destination = (HttpDestination)context.get(HttpClientTransport.HTTP_DESTINATION_CONTEXT_KEY);
    Executor executor = destination.getHttpClient().getExecutor();
    Socks4ProxyConnection connection = new Socks4ProxyConnection(endPoint, executor, connectionFactory, context);
    return customize(connection, context);
  }
}

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

public HttpConnectionOverHTTP(EndPoint endPoint, HttpDestination destination, Promise<Connection> promise)
{
  super(endPoint, destination.getHttpClient().getExecutor());
  this.promise = promise;
  this.delegate = new Delegate(destination);
  this.channel = newHttpChannel();
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public HttpConnection(HttpClient client, EndPoint endPoint, HttpDestination destination)
{
  super(endPoint, client.getExecutor(), client.isDispatchIO());
  this.client = client;
  this.destination = destination;
  this.sender = new HttpSender(this);
  this.receiver = new HttpReceiver(this);
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public HttpConnection(HttpClient client, EndPoint endPoint, HttpDestination destination)
{
  super(endPoint, client.getExecutor(), client.isDispatchIO());
  this.client = client;
  this.destination = destination;
  this.sender = new HttpSender(this);
  this.receiver = new HttpReceiver(this);
}

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

protected ClientConnectionFactory newSslClientConnectionFactory(ClientConnectionFactory connectionFactory)
{
  return new SslClientConnectionFactory(getSslContextFactory(), getByteBufferPool(), getExecutor(), connectionFactory);
}

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

@Override
public void close()
{
  // client must be destroyed before the pools or
  // you will create a several second busy wait loop
  closeQuietly(httpClient);
  closeQuietly((LifeCycle) httpClient.getExecutor());
  closeQuietly(httpClient.getScheduler());
}

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

@Override
public void close()
{
  // client must be destroyed before the pools or
  // you will create a several second busy wait loop
  closeQuietly(httpClient);
  closeQuietly((LifeCycle) httpClient.getExecutor());
  closeQuietly(httpClient.getScheduler());
  requestLogger.close();
}

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

private void executeAbort(HttpExchange exchange, Throwable failure)
{
  try
  {
    Executor executor = getHttpChannel().getHttpDestination().getHttpClient().getExecutor();
    executor.execute(() -> abort(exchange, failure));
  }
  catch (RejectedExecutionException x)
  {
    if (LOG.isDebugEnabled())
      LOG.debug(x);
    abort(exchange, failure);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

client.getExecutor().execute(new Runnable()

代码示例来源:origin: org.eclipse.jetty.http2/http2-http-client-transport

@Override
protected void doStart() throws Exception
{
  if (!client.isStarted())
  {
    HttpClient httpClient = getHttpClient();
    client.setExecutor(httpClient.getExecutor());
    client.setScheduler(httpClient.getScheduler());
    client.setByteBufferPool(httpClient.getByteBufferPool());
    client.setConnectTimeout(httpClient.getConnectTimeout());
    client.setIdleTimeout(httpClient.getIdleTimeout());
    client.setInputBufferSize(httpClient.getResponseBufferSize());
  }
  addBean(client);
  super.doStart();
  this.connectionFactory = new HTTP2ClientConnectionFactory();
  client.setClientConnectionFactory((endPoint, context) ->
  {
    HttpDestination destination = (HttpDestination)context.get(HTTP_DESTINATION_CONTEXT_KEY);
    return destination.getClientConnectionFactory().newConnection(endPoint, context);
  });
}

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

jettyRequest.content(new BodyGeneratorContentProvider(bodyGenerator, httpClient.getExecutor()));

相关文章

HttpClient类方法