net.rim.device.api.io.transport
Class TransportInfo

java.lang.Object
  extended by net.rim.device.api.io.transport.TransportInfo

public class TransportInfo
extends Object

This class provides methods that provide information about the transport types available on a BlackBerry device. It also enables you to check that a given transport type has the required coverage.

To establish a connection over a particular transport type two requirements must be met. The transport type must be available and the transport type must have sufficient coverage to establish a reliable connection.

See Also:
TransportDescriptor
Since:
BlackBerry API 5.0.0

Field Summary
static int TRANSPORT_BIS_B
          Represents the Blackberry Internet Service transport type
static int TRANSPORT_MDS
          Represents the MDS transport type
static int TRANSPORT_TCP_CELLULAR
          Represents TCP Cellular transport also known as Direct TCP
static int TRANSPORT_TCP_WIFI
          Represents the WIFI transport type
static int TRANSPORT_WAP
          Represents the Wap 1.0 and Wap 1.1 transport types
static int TRANSPORT_WAP2
          Represents the Wap 2.0 transport type
 
Method Summary
static int[] getAvailableTransportTypes()
          Allows to retrieve all the transport types available (regardless coverage) on the device.
static TransportDescriptor[] getAvailableTransports()
          Allows to retrieve the TransportDescriptors for all the available (regardless coverage) transports on the device.
static TransportDescriptor[] getTransportDescriptors(int transportType)
          Provides an array of TransportDescriptor for the specified transportType
static TransportDescriptor[] getTransportDescriptors(int[] transportTypes)
          Allows to retrieve information for a group of transport types.
static String getTransportTypeName(int transportType)
          Provides the name for the specified transportType
static boolean hasSufficientCoverage(int transportType)
          Determines if there's sufficient coverage to use the specified transportType
static boolean isTransportAvailable(int transportType, String ConnectionUID)
          Determines whether or not the device is currently capable of using the specified transport instance (i.e. the device supports the specified transportType, and using the specified ConnectionUID.
static boolean isTransportTypeAvailable(int transportType)
          Determines whether or not the device is currently capable of using the specified transportType (i.e. the necessary hardware and proper service record are present).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

TRANSPORT_TCP_CELLULAR

public static final int TRANSPORT_TCP_CELLULAR
Represents TCP Cellular transport also known as Direct TCP

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

TRANSPORT_WAP

public static final int TRANSPORT_WAP
Represents the Wap 1.0 and Wap 1.1 transport types

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

TRANSPORT_WAP2

public static final int TRANSPORT_WAP2
Represents the Wap 2.0 transport type

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

TRANSPORT_MDS

public static final int TRANSPORT_MDS
Represents the MDS transport type

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

TRANSPORT_BIS_B

public static final int TRANSPORT_BIS_B
Represents the Blackberry Internet Service transport type

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

TRANSPORT_TCP_WIFI

public static final int TRANSPORT_TCP_WIFI
Represents the WIFI transport type

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0


Method Detail

isTransportTypeAvailable

public static boolean isTransportTypeAvailable(int transportType)
Determines whether or not the device is currently capable of using the specified transportType (i.e. the necessary hardware and proper service record are present).

Parameters:
transportType - One of the TRANSPORT_* defined on @link TransportType
Returns:
true if the device is capable of using the specified transportType false otherwise
Since:
BlackBerry API 5.0.0

isTransportAvailable

public static boolean isTransportAvailable(int transportType,
                                           String ConnectionUID)
Determines whether or not the device is currently capable of using the specified transport instance (i.e. the device supports the specified transportType, and using the specified ConnectionUID.
Passing null for the ConnectionUID will cause the method to behave as isTransportTypeAvailable()

Parameters:
transportType - One of the TRANSPORT_* defined on @link TransportType
ConnectionUID - The UID of the ServiceRecord for a specific transport instance
Returns:
true if the device is capable of using the specified transport instance false otherwise
Since:
BlackBerry API 5.0.0

getAvailableTransportTypes

public static int[] getAvailableTransportTypes()
Allows to retrieve all the transport types available (regardless coverage) on the device.

Returns:
an array of transportType representing the available transport types
Since:
BlackBerry API 5.0.0

getAvailableTransports

public static TransportDescriptor[] getAvailableTransports()
Allows to retrieve the TransportDescriptors for all the available (regardless coverage) transports on the device.

Returns:
an array of TransportDescriptor representing the available transports (regardless coverage and type)
Since:
BlackBerry API 5.0.0

getTransportDescriptors

public static TransportDescriptor[] getTransportDescriptors(int transportType)
Provides an array of TransportDescriptor for the specified transportType

Parameters:
transportType - One of the TRANSPORT_* defined on TransportInfo
Returns:
an array TransportDescriptor objects containing information about the transports corresponding to the specified transportType
Since:
BlackBerry API 5.0.0

getTransportDescriptors

public static TransportDescriptor[] getTransportDescriptors(int[] transportTypes)
Allows to retrieve information for a group of transport types.

Parameters:
transportTypes - and array of the TRANSPORT_* defined on @link TransportType
Returns:
an array of TransportDescriptors
Since:
BlackBerry API 5.0.0

hasSufficientCoverage

public static boolean hasSufficientCoverage(int transportType)
Determines if there's sufficient coverage to use the specified transportType

Parameters:
transportType - One of the TRANSPORT_* defined on @link TransportType
Returns:
true if enough coverage is available to use the specified transport. false otherwise.
Since:
BlackBerry API 5.0.0

getTransportTypeName

public static String getTransportTypeName(int transportType)
Provides the name for the specified transportType

Parameters:
transportType - One of the TRANSPORT_* defined on @link TransportType
Returns:
The English transport's name. "Unknown" is returned for invalid transportTypes
Since:
BlackBerry API 5.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.