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

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

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

HttpClient.getDestination介绍

[英]Returns a Destination for the given scheme, host and port. Applications may use Destinations to create Connections that will be outside HttpClient's pooling mechanism, to explicitly control the connection lifecycle (in particular their termination with Connection#close()).
[中]返回给定方案、主机和端口的目标。应用程序可以使用目的地创建HttpClient池机制之外的连接,以明确控制连接生命周期(特别是使用connection#close()终止连接)。

代码示例

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

@SuppressWarnings("UnusedDeclaration")
public String dumpDestination(URI uri)
{
  Destination destination = httpClient.getDestination(uri.getScheme(), uri.getHost(), uri.getPort());
  if (destination == null) {
    return null;
  }
  return dumpDestination(destination);
}

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

@SuppressWarnings("UnusedDeclaration")
public String dumpDestination(URI uri)
{
  Destination destination = httpClient.getDestination(uri.getScheme(), uri.getHost(), uri.getPort());
  if (destination == null) {
    return null;
  }
  return dumpDestination(destination);
}

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

public HttpDestination getDestination(Address remote, boolean ssl) throws IOException
{
  return getDestination(remote, ssl, getSslContextFactory());
}

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

public void send(HttpExchange exchange) throws IOException
{
  boolean ssl = HttpSchemes.HTTPS_BUFFER.equalsIgnoreCase(exchange.getScheme());
  HttpDestination destination = getDestination(exchange.getAddress(), ssl);
  destination.send(exchange);
}

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

HttpDestination destination=_destination.getHttpClient().getDestination(_exchange.getAddress(),isHttps);

相关文章

HttpClient类方法