Slide 4.13: Line-by-line anatomy of RecordStore project (cont.)
  Slide 5.2: Network connection (cont.)
  Home


Network Connection


The following slides introduce the details of the generic Connection framework used in MIDP, and shows how to develop network applications using that framework.

The CLDC Connection Framework
  The java.io.* and java.net.* packages of the J2SE are not suitable for handheld devices with a small memory footprint. The javax.microedition.io CLDC package contains classes for input/output (I/O), including networking I/O. To these CLDC classes, the MIDP adds the HttpConnection interface for HTTP protocol access. This interface defines the necessary methods and constants for an HTTP connection.

Generic Connections
In the CLDC Generic Connection framework, all connections are created using the open static method from the Connector class. If successful, this method returns an object that implements one of the generic connection interfaces.
The figure shows how these interfaces form an is-a hierarchy. The Connection interface is the base interface such that StreamConnectionNotifier is a Connection and InputConnection is a Connection too.