java.lang.Object | |
↳ | org.apache.http.conn.routing.HttpRoute |
The route for a request. Instances of this class are unmodifiable and therefore suitable for use as lookup keys.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new route with all attributes specified explicitly.
| |||||||||||
Creates a new route with at most one proxy.
| |||||||||||
Creates a new direct route.
| |||||||||||
Creates a new direct insecure route.
| |||||||||||
Creates a new route through a proxy.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates and returns a copy of this
Object . | |||||||||||
Compares this route to another.
| |||||||||||
Obtains the number of hops in this route.
| |||||||||||
Obtains the target of a hop in this route.
| |||||||||||
Obtains the layering type of this route.
| |||||||||||
Obtains the local address to connect from.
| |||||||||||
Obtains the first proxy host.
| |||||||||||
Obtains the target host.
| |||||||||||
Obtains the tunnel type of this route.
| |||||||||||
Generates a hash code for this route.
| |||||||||||
Checks whether this route includes a layered protocol.
| |||||||||||
Checks whether this route is secure.
| |||||||||||
Checks whether this route is tunnelled through a proxy.
| |||||||||||
Obtains a description of this route.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface org.apache.http.conn.routing.RouteInfo
|
Creates a new route with all attributes specified explicitly.
target | the host to which to route |
---|---|
local | the local address to route from, or
null for the default |
proxies | the proxy chain to use, or
null for a direct route |
secure | true if the route is (to be) secure,
false otherwise |
tunnelled | the tunnel type of this route |
layered | the layering type of this route |
Creates a new route with at most one proxy.
target | the host to which to route |
---|---|
local | the local address to route from, or
null for the default |
proxy | the proxy to use, or
null for a direct route |
secure | true if the route is (to be) secure,
false otherwise |
tunnelled | true if the route is (to be) tunnelled
via the proxy,
false otherwise |
layered | true if the route includes a
layered protocol,
false otherwise
|
Creates a new direct route. That is a route without a proxy.
target | the host to which to route |
---|---|
local | the local address to route from, or
null for the default |
secure | true if the route is (to be) secure,
false otherwise
|
Creates a new direct insecure route.
target | the host to which to route |
---|
Creates a new route through a proxy.
When using this constructor, the proxy
MUST be given.
For convenience, it is assumed that a secure connection will be
layered over a tunnel through the proxy.
target | the host to which to route |
---|---|
local | the local address to route from, or
null for the default |
proxy | the proxy to use |
secure | true if the route is (to be) secure,
false otherwise
|
Creates and returns a copy of this Object
. The default
implementation returns a so-called "shallow" copy: It creates a new
instance of the same class and then copies the field values (including
object references) from this instance to the new instance. A "deep" copy,
in contrast, would also recursively clone nested objects. A subclass that
needs to implement this kind of cloning should call super.clone()
to create the new instance and then create deep copies of the nested,
mutable objects.
CloneNotSupportedException |
---|
Compares this route to another.
o | the object to compare with |
---|
true
if the argument is the same route,
false
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.
Obtains the target of a hop in this route. The target of the last hop is the target host, the target of previous hops is the respective proxy in the chain. For a route through exactly one proxy, target of hop 0 is the proxy and target of hop 1 is the target host.
hop | index of the hop for which to get the target, 0 for first |
---|
Obtains the layering type of this route. In the presence of proxies, only layering over an end-to-end tunnel is considered.
Obtains the local address to connect from.
null
Obtains the first proxy host.
null
if this route is direct
Obtains the target host.
Obtains the tunnel type of this route. If there is a proxy chain, only end-to-end tunnels are considered.
Generates a hash code for this route.
Checks whether this route includes a layered protocol. In the presence of proxies, only layering over an end-to-end tunnel is considered.
true
if layered,
false
otherwise
Checks whether this route is secure.
true
if secure,
false
otherwise
Checks whether this route is tunnelled through a proxy. If there is a proxy chain, only end-to-end tunnels are considered.
true
if tunnelled end-to-end through at least
one proxy,
false
otherwise
Obtains a description of this route.