| Modifier and Type | Field and Description |
|---|---|
| private final RouteInfo. | layered
Whether the route is layered. |
| private final InetAddress | localAddress
The local address to connect from. |
| private final List | proxyChain
The proxy servers, if any. |
| private final boolean | secure
Whether the route is (supposed to be) secure. |
| private final HttpHost | targetHost
The target host to connect to. |
| private final RouteInfo. | tunnelled
Whether the the route is tunnelled through the proxy. |
| Access | Constructor and Description |
|---|---|
| private | HttpRoute(final HttpHost target, final InetAddress local, final List<HttpHost> proxies, final boolean secure, final RouteInfo.
|
| public | HttpRoute(final HttpHost
the host to which to route target, final InetAddress the local address to route from, or
local, final HttpHost[] null for the defaultthe proxy chain to use, or
proxies, final boolean null for a direct routetrue if the route is (to be) secure,
false otherwisethe tunnel type of this route tunnelled,the layering type of this route layeredCreates a new route with all attributes specified explicitly. |
| public | HttpRoute(final HttpHost
the host to which to route target, final InetAddress the local address to route from, or
local, final HttpHost null for the defaultthe proxy to use, or
proxy, final boolean null for a direct routetrue if the route is (to be) secure,
false otherwisetrue if the route is (to be) tunnelled
via the proxy,
false otherwisetrue if the route includes a
layered protocol,
false otherwiseCreates a new route with at most one proxy. |
| public | HttpRoute(final HttpHost
the host to which to route target, final InetAddress the local address to route from, or
local, final boolean null for the defaulttrue if the route is (to be) secure,
false otherwiseCreates a new direct route. |
| public | |
| public | HttpRoute(final HttpHost
the host to which to route target, final InetAddress the local address to route from, or
local, final HttpHost null for the defaultthe proxy to use proxy, final boolean true if the route is (to be) secure,
false otherwiseCreates a new route through a proxy. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public boolean | Returns: true if the argument is the same route,
falsethe object to compare with obj)Overrides java. |
| private static int | |
| public int | getHopCount()
Implements org. |
| public HttpHost | getHopTarget(final int
index of the hop for which to get the target,
0 for first hop)Implements org. |
| public RouteInfo. | getLayerType()
Implements org. |
| public InetAddress | getLocalAddress()
Implements org. |
| public InetSocketAddress | |
| public HttpHost | getProxyHost()
Implements org. |
| public HttpHost | getTargetHost()
Implements org. |
| public RouteInfo. | getTunnelType()
Implements org. |
| public int | Returns: the hash codeOverrides java. |
| public boolean | isLayered()
Implements org. |
| public boolean | isSecure()
Implements org. |
| public boolean | isTunnelled()
Implements org. |
| private static HttpHost | |
| public String | Returns: a human-readable representation of this routeOverrides java. |
| layered | back to summary |
|---|---|
| private final RouteInfo. Whether the route is layered. | |
| localAddress | back to summary |
|---|---|
| private final InetAddress localAddress The local address to connect from.
| |
| proxyChain | back to summary |
|---|---|
| private final List<HttpHost> proxyChain The proxy servers, if any. Never null. | |
| secure | back to summary |
|---|---|
| private final boolean secure Whether the route is (supposed to be) secure. | |
| targetHost | back to summary |
|---|---|
| private final HttpHost targetHost The target host to connect to. | |
| tunnelled | back to summary |
|---|---|
| private final RouteInfo. Whether the the route is tunnelled through the proxy. | |
| HttpRoute | back to summary |
|---|---|
| private HttpRoute(final HttpHost target, final InetAddress local, final List<HttpHost> proxies, final boolean secure, final RouteInfo. | |
| HttpRoute | back to summary |
|---|---|
| public HttpRoute(final HttpHost target, final InetAddress local, final HttpHost[] proxies, final boolean secure, final RouteInfo. Creates a new route with all attributes specified explicitly.
| |
| HttpRoute | back to summary |
|---|---|
| public HttpRoute(final HttpHost target, final InetAddress local, final HttpHost proxy, final boolean secure, final RouteInfo. Creates a new route with at most one proxy.
| |
| HttpRoute | back to summary |
|---|---|
| public HttpRoute(final HttpHost target, final InetAddress local, final boolean secure) Creates a new direct route. That is a route without a proxy.
| |
| HttpRoute | back to summary |
|---|---|
| public HttpRoute(final HttpHost target) Creates a new direct insecure route.
| |
| HttpRoute | back to summary |
|---|---|
| public HttpRoute(final HttpHost target, final InetAddress local, final HttpHost proxy, final boolean secure) Creates a new route through a proxy.
When using this constructor, the
| |
| HttpRoute | back to summary |
|---|---|
| public HttpRoute(final HttpHost target, final HttpHost proxy) Creates a new plain route through a proxy. | |
| clone | back to summary |
|---|---|
| public Object clone() throws CloneNotSupportedException Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Compares this route to another. | |
| getDefaultPort | back to summary |
|---|---|
| private static int getDefaultPort(final String schemeName) | |
| getHopCount | back to summary |
|---|---|
| public int getHopCount() Implements org. Doc from org. Obtains the number of hops in this route. A direct route has one hop. A route through a proxy has two hops. A route through a chain of n proxies has n+1 hops.
| |
| getHopTarget | back to summary |
|---|---|
| public HttpHost getHopTarget(final int hop) Implements org. Doc from org. Obtains the target of a hop in this route.
The target of the last hop is the | |
| getLayerType | back to summary |
|---|---|
| public RouteInfo. Implements org. Doc from org. Obtains the layering type of this route. In the presence of proxies, only layering over an end-to-end tunnel is considered. | |
| getLocalAddress | back to summary |
|---|---|
| public InetAddress getLocalAddress() Implements org. Doc from org. Obtains the local address to connect from.
| |
| getLocalSocketAddress | back to summary |
|---|---|
| public InetSocketAddress getLocalSocketAddress() | |
| getProxyHost | back to summary |
|---|---|
| public HttpHost getProxyHost() Implements org. Doc from org. Obtains the first proxy host. | |
| getTargetHost | back to summary |
|---|---|
| public HttpHost getTargetHost() Implements org. Doc from org. Obtains the target host. | |
| getTunnelType | back to summary |
|---|---|
| public RouteInfo. Implements org. Doc from org. Obtains the tunnel type of this route. If there is a proxy chain, only end-to-end tunnels are considered.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Generates a hash code for this route.
| |
| isLayered | back to summary |
|---|---|
| public boolean isLayered() Implements org. Doc from org. Checks whether this route includes a layered protocol. In the presence of proxies, only layering over an end-to-end tunnel is considered.
| |
| isSecure | back to summary |
|---|---|
| public boolean isSecure() Implements org. Doc from org. Checks whether this route is secure.
| |
| isTunnelled | back to summary |
|---|---|
| public boolean isTunnelled() Implements org. Doc from org. Checks whether this route is tunnelled through a proxy. If there is a proxy chain, only end-to-end tunnels are considered.
| |
| normalize | back to summary |
|---|---|
| private static HttpHost normalize(final HttpHost target) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Obtains a description of this route. | |