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

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

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

HttpClient.removeBean介绍

暂无

代码示例

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

protected boolean removeDestination(HttpDestination destination)
{
  removeBean(destination);
  return destinations.remove(destination.getOrigin(), destination);
}

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

/** Set the ThreadPool.
 * The threadpool passed is added via {@link #addBean(Object)} so that
 * it's lifecycle may be managed as a {@link AggregateLifeCycle}.
 * @param threadPool the threadPool to set
 */
public void setThreadPool(ThreadPool threadPool)
{
  removeBean(_threadPool);
  _threadPool = threadPool;
  addBean(_threadPool);
}

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

@Override
protected void doStop() throws Exception
{
  for (HttpDestination destination : _destinations.values())
    destination.close();
  _timeoutQ.cancelAll();
  _idleTimeoutQ.cancelAll();
  super.doStop();
  if (_threadPool instanceof LocalQueuedThreadPool)
  {
    removeBean(_threadPool);
    _threadPool = null;
  }
  removeBean(_connector);
}

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

protected HttpDestination destinationFor(String scheme, String host, int port)
{
  if (!HttpScheme.HTTP.is(scheme) && !HttpScheme.HTTPS.is(scheme) &&
      !HttpScheme.WS.is(scheme) && !HttpScheme.WSS.is(scheme))
    throw new IllegalArgumentException("Invalid protocol " + scheme);
  scheme = scheme.toLowerCase(Locale.ENGLISH);
  host = host.toLowerCase(Locale.ENGLISH);
  port = normalizePort(scheme, port);
  Origin origin = new Origin(scheme, host, port);
  HttpDestination destination = destinations.get(origin);
  if (destination == null)
  {
    destination = transport.newHttpDestination(origin);
    addManaged(destination);
    HttpDestination existing = destinations.putIfAbsent(origin, destination);
    if (existing != null)
    {
      removeBean(destination);
      destination = existing;
    }
    else
    {
      if (LOG.isDebugEnabled())
        LOG.debug("Created {}", destination);
    }
  }
  return destination;
}

相关文章

HttpClient类方法