• BlackBerry Dynamics
  • Runtime library for Android applications
  • 12.0.1.79
RouteInfo Interface Reference

Read-only interface for route information. More...

Inheritance diagram for RouteInfo:
HttpRoute RouteTracker

Description

Author
Roland Weber
Version
Revision
652200
Since
4.0

Notice

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...
 

Member Function Documentation

◆ getTargetHost()

HttpHost getTargetHost ( )
Returns
the target host

Implemented in HttpRoute, and RouteTracker.

◆ getLocalAddress()

InetAddress getLocalAddress ( )
Returns
the local address, or null

Implemented in HttpRoute, and RouteTracker.

◆ getHopCount()

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.

Returns
the number of hops in this route

Implemented in HttpRoute, and RouteTracker.

◆ getHopTarget()

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.

Parameters
hopindex of the hop for which to get the target, 0 for first
Returns
the target of the given hop
Exceptions
IllegalArgumentExceptionif the argument is negative or not less than getHopCount()

Implemented in HttpRoute, and RouteTracker.

◆ getProxyHost()

HttpHost getProxyHost ( )
Returns
the first proxy in the proxy chain, or null if this route is direct

Implemented in HttpRoute, and RouteTracker.

◆ getTunnelType()

TunnelType getTunnelType ( )

If there is a proxy chain, only end-to-end tunnels are considered.

Returns
the tunnelling type

Implemented in HttpRoute, and RouteTracker.

◆ isTunnelled()

boolean isTunnelled ( )

If there is a proxy chain, only end-to-end tunnels are considered.

Returns
true if tunnelled end-to-end through at least one proxy, false otherwise

Implemented in HttpRoute, and RouteTracker.

◆ getLayerType()

LayerType getLayerType ( )

In the presence of proxies, only layering over an end-to-end tunnel is considered.

Returns
the layering type

Implemented in HttpRoute, and RouteTracker.

◆ isLayered()

boolean isLayered ( )

In the presence of proxies, only layering over an end-to-end tunnel is considered.

Returns
true if layered, false otherwise

Implemented in HttpRoute, and RouteTracker.

◆ isSecure()

boolean isSecure ( )
Returns
true if secure, false otherwise

Implemented in HttpRoute, and RouteTracker.