Read-only interface for route information. More...
The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Classes | |
enum | LayerType |
The layering type of a route. More... | |
enum | TunnelType |
The tunnelling type of a route. More... | |
Public Member Functions | |
HttpHost | getTargetHost () |
Obtains the target host. More... | |
InetAddress | getLocalAddress () |
Obtains the local address to connect from. More... | |
int | getHopCount () |
Obtains the number of hops in this route. More... | |
HttpHost | getHopTarget (int hop) |
Obtains the target of a hop in this route. More... | |
HttpHost | getProxyHost () |
Obtains the first proxy host. More... | |
TunnelType | getTunnelType () |
Obtains the tunnel type of this route. More... | |
boolean | isTunnelled () |
Checks whether this route is tunnelled through a proxy. More... | |
LayerType | getLayerType () |
Obtains the layering type of this route. More... | |
boolean | isLayered () |
Checks whether this route includes a layered protocol. More... | |
boolean | isSecure () |
Checks whether this route is secure. More... | |
HttpHost getTargetHost | ( | ) |
Implemented in HttpRoute, and RouteTracker.
InetAddress getLocalAddress | ( | ) |
null
Implemented in HttpRoute, and RouteTracker.
int getHopCount | ( | ) |
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.
Implemented in HttpRoute, and RouteTracker.
HttpHost getHopTarget | ( | int | hop | ) |
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 |
IllegalArgumentException | if the argument is negative or not less than getHopCount() |
Implemented in HttpRoute, and RouteTracker.
HttpHost getProxyHost | ( | ) |
null
if this route is direct Implemented in HttpRoute, and RouteTracker.
TunnelType getTunnelType | ( | ) |
If there is a proxy chain, only end-to-end tunnels are considered.
Implemented in HttpRoute, and RouteTracker.
boolean isTunnelled | ( | ) |
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 Implemented in HttpRoute, and RouteTracker.
LayerType getLayerType | ( | ) |
In the presence of proxies, only layering over an end-to-end tunnel is considered.
Implemented in HttpRoute, and RouteTracker.
boolean isLayered | ( | ) |
In the presence of proxies, only layering over an end-to-end tunnel is considered.
true
if layered, false
otherwise Implemented in HttpRoute, and RouteTracker.
boolean isSecure | ( | ) |
true
if secure, false
otherwise Implemented in HttpRoute, and RouteTracker.