| Modifier and Type | Field and Description |
|---|---|
| private boolean | connected
Whether the first hop of the route is established. |
| private RouteInfo. | layered
Whether the route is layered over a tunnel. |
| private final InetAddress | localAddress
The local address to connect from. |
| private HttpHost[] | proxyChain
The proxy chain, if any. |
| private boolean | secure
Whether the route is secure. |
| private final HttpHost | targetHost
The target host to connect to. |
| private RouteInfo. | tunnelled
Whether the the route is tunnelled end-to-end through proxies. |
| Access | Constructor and Description |
|---|---|
| public | RouteTracker(final HttpHost
the host to which to route target, final InetAddress the local address to route from, or
local)null for the defaultCreates a new route tracker. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public void | connectProxy(final HttpHost
the proxy connected to proxy, final boolean true if the route is secure,
false otherwiseTracks connecting to the first proxy. |
| public void | connectTarget(final boolean
true if the route is secure,
false otherwiseTracks connecting to the target. |
| public boolean | Returns: true if the argument is the same tracked route,
falsethe object to compare with o)Overrides java. |
| 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 HttpHost | getProxyHost()
Implements org. |
| public HttpHost | getTargetHost()
Implements org. |
| public RouteInfo. | getTunnelType()
Implements org. |
| public int | Returns: the hash codeOverrides java. |
| public boolean | |
| public boolean | isLayered()
Implements org. |
| public boolean | isSecure()
Implements org. |
| public boolean | isTunnelled()
Implements org. |
| public void | layerProtocol(final boolean
true if the route is secure,
false otherwiseTracks layering a protocol. |
| public void | |
| public HttpRoute | Returns: the tracked route, ornull if nothing has been tracked so farObtains the tracked route. |
| public String | Returns: a human-readable representation of the tracked routeOverrides java. |
| public void | tunnelProxy(final HttpHost
the proxy tunnelled to proxy, final boolean true if the route is secure,
false otherwiseTracks tunnelling to a proxy in a proxy chain. |
| public void | tunnelTarget(final boolean
true if the route is secure,
false otherwiseTracks tunnelling to the target. |
| connected | back to summary |
|---|---|
| private boolean connected Whether the first hop of the route is established. | |
| layered | back to summary |
|---|---|
| private RouteInfo. Whether the route is layered over a tunnel. | |
| localAddress | back to summary |
|---|---|
| private final InetAddress localAddress The local address to connect from.
| |
| proxyChain | back to summary |
|---|---|
| private HttpHost[] proxyChain The proxy chain, if any. | |
| secure | back to summary |
|---|---|
| private boolean secure Whether the route is secure. | |
| targetHost | back to summary |
|---|---|
| private final HttpHost targetHost The target host to connect to. | |
| tunnelled | back to summary |
|---|---|
| private RouteInfo. Whether the the route is tunnelled end-to-end through proxies. | |
| RouteTracker | back to summary |
|---|---|
| public RouteTracker(final HttpHost target, final InetAddress local) Creates a new route tracker. The target and origin need to be specified at creation time.
| |
| RouteTracker | back to summary |
|---|---|
| public RouteTracker(final HttpRoute route) Creates a new tracker for the given route. Only target and origin are taken from the route, everything else remains to be tracked.
| |
| 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
| |
| connectProxy | back to summary |
|---|---|
| public void connectProxy(final HttpHost proxy, final boolean secure) Tracks connecting to the first proxy.
| |
| connectTarget | back to summary |
|---|---|
| public void connectTarget(final boolean secure) Tracks connecting to the target.
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object o) Overrides java. Compares this tracked route to another. | |
| 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.
| |
| 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 tracked route.
Route trackers are modifiable and should therefore not be used
as lookup keys. Use
| |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() | |
| 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.
| |
| layerProtocol | back to summary |
|---|---|
| public void layerProtocol(final boolean secure) Tracks layering a protocol.
| |
| reset | back to summary |
|---|---|
public void reset()
| |
| toRoute | back to summary |
|---|---|
| public HttpRoute toRoute() Obtains the tracked route.
If a route has been tracked, it is
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Obtains a description of the tracked route. | |
| tunnelProxy | back to summary |
|---|---|
| public void tunnelProxy(final HttpHost proxy, final boolean secure) Tracks tunnelling to a proxy in a proxy chain. This will extend the tracked proxy chain, but it does not mark the route as tunnelled. Only end-to-end tunnels are considered there.
| |
| tunnelTarget | back to summary |
|---|---|
| public void tunnelTarget(final boolean secure) Tracks tunnelling to the target.
| |