BlackBerry® devices support many different transports that facilitate reliable data communication between third-party applications and the Internet. The transports available are TCP Cellular, BlackBerry® Mobile Data System (BlackBerry MDS), BlackBerry® Internet Service Browsing (BIS-B), Wireless Access Protocol (WAP)1.0, WAP2.0 and Wi-Fi® technology. It is important to understand the differences between these transports and how and when to leverage each transport.
Prior to BlackBerry® Java® Development Environment (BlackBerry JDE) 5.0 it is also crucial to determine if a transport is available for use before trying to use it. The new networking API (net.rim.device.api.io.transport) introduced in BlackBerry JDE 5.0 are designed to simplify the establishment of connections over the different transports available on the BlackBerry device by abstracting away the details of parsing services records and constructing proper URLs for the Connector.open().
In BlackBerry JDE 5.0 the getConnection() methodas part of the ConnectionFactory class allows you to create a connection to the specified URL starting with HTTP, HTTPs, socket, TLS or SSL connections using the first available transport type from the array of preferred transport types if defined, or from the available transport types if no preferences were set.At the same time it is important to note that this class is not thread-safe and the getConnection() method blocks. This means that you should not call these methods from the main event thread of an application.
In addition to configuring the preferred transports you can customize the factory by setting specific options to use for the TCP Cellular, WAP, and BIS-B.Developers can also specify connection timeout settings for WAP, MDS, BIS-B and also enable and listen for connection retry attempts.
For more information on the Network Transport API please refer to the net.rim.device.api.io.transport package.
<!--[if gte mso 10]> <!--[endif]-->
BlackBerry® Java® Development Environment (BlackBerry JDE) 5.0 or later