List of usage examples for org.apache.http.nio.conn.scheme AsyncScheme resolvePort
public final int resolvePort(final int port)
From source file:org.apache.http.impl.nio.conn.HttpNIOConnPool.java
@Override protected SocketAddress resolveRemoteAddress(final HttpRoute route) { HttpHost firsthop = route.getProxyHost(); if (firsthop == null) { firsthop = route.getTargetHost(); }/*from w w w . j a va 2s . c o m*/ final String hostname = firsthop.getHostName(); int port = firsthop.getPort(); if (port < 0) { final AsyncScheme scheme = this.schemeRegistry.getScheme(firsthop); port = scheme.resolvePort(port); } return new InetSocketAddress(hostname, port); }