|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.io.transport.TransportInfo
public class TransportInfo
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.
TransportDescriptor
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 void |
addListener(CoverageStatusListener coverageListener)
Adds the specified CoverageStatusListener
Listener will be wrapped with WeakReference |
|
static int[] |
getAvailableTransportTypes()
Retrieves all the available transport types on the device (regardless of coverage) . |
|
static TransportDescriptor[] |
getAvailableTransports()
Retrieves the TransportDescriptor s for all the available (regardless coverage) transports on the device. |
|
static int[] |
getCoverageStatus()
Retrieves all the transport types with sufficient coverage on the device. |
|
static TransportDescriptor[] |
getTransportDescriptors(int transportType)
Provides an array of TransportDescriptor for the specified transportType |
|
static TransportDescriptor[] |
getTransportDescriptors(int[] transportTypes)
Retrieves 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). |
|
static void |
removeListener(CoverageStatusListener coverageListener)
Removes the specified CoverageStatusListener |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TRANSPORT_TCP_CELLULAR
public static final int TRANSPORT_WAP
public static final int TRANSPORT_WAP2
public static final int TRANSPORT_MDS
public static final int TRANSPORT_BIS_B
public static final int TRANSPORT_TCP_WIFI
Method Detail |
---|
public static boolean isTransportTypeAvailable(int transportType)
transportType
(i.e. the
necessary hardware and proper service record are present).
transportType
- One of the TRANSPORT_*
defined on TransportInfo
true
if the device is capable of using the specified transportType
false
otherwisepublic static boolean isTransportAvailable(int transportType, String ConnectionUID)
transportType
, and
using the specified ConnectionUID.null
for the ConnectionUID
will cause the method to behave
as isTransportTypeAvailable()
transportType
- One of the TRANSPORT_*
defined on TransportInfo
ConnectionUID
- The UID of the ServiceRecord
for a specific transport instance
true
if the device is capable of using the specified transport instance
false
otherwisepublic static int[] getAvailableTransportTypes()
transportType
representing the available transport typespublic static TransportDescriptor[] getAvailableTransports()
TransportDescriptor
s for all the available (regardless coverage) transports on the device.
TransportDescriptor
representing the available transports (regardless coverage and type)public static int[] getCoverageStatus()
transportType
representing the transport types with sufficient coverage.public static TransportDescriptor[] getTransportDescriptors(int transportType)
TransportDescriptor
for the specified transportType
transportType
- One of the TRANSPORT_*
defined on TransportInfo
TransportDescriptor
objects containing information about the
transports corresponding to the specified transportType
public static TransportDescriptor[] getTransportDescriptors(int[] transportTypes)
transportTypes
- and array of the TRANSPORT_*
defined on TransportInfo
TransportDescriptor
spublic static boolean hasSufficientCoverage(int transportType)
transportType
transportType
- One of the TRANSPORT_*
defined on TransportInfo
true
if enough coverage is available to use the specified transport.
false
otherwise.public static String getTransportTypeName(int transportType)
transportType
transportType
- One of the TRANSPORT_*
defined on TransportInfo
public static void addListener(CoverageStatusListener coverageListener)
CoverageStatusListener
Listener will be wrapped with WeakReference
coverageListener
- the CoverageStatusListener to add
NullPointerException
- if the coverageListener
parameter is nullpublic static void removeListener(CoverageStatusListener coverageListener)
CoverageStatusListener
coverageListener
- the CoverageStatusListener to remove
NullPointerException
- if the coverageListener
parameter is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.