C H A P T E R  1

Software Overview

Java Wireless Client software is a high-performance Java ME platform stack for mobile devices. Java Wireless Client software shortens the porting and integration effort with the following features:


Specifications and APIs

Java Wireless Client software supports many components of Mobile Service Architecture (MSA) (JSR 248). MSA is a comprehensive platform based on CLDC and MIDP. Here is a complete list of the APIs encompassed by Java Wireless Client software:

In addition, Java Wireless Client software also supports JSR 239 OpenGL ES, an optional API that is not part of MSA.

Consult the Java Community Processtrademark (JCPtrademark) program web site, http://jcp.org/, for more information on any of these specifications.


Architecture

In very broad terms, the architecture of Java Wireless Client software looks like this:

FIGURE 1-1 Overall Architecture


Java Wireless Client software is everything that lies between the OS and applications. The choppy line indicates the portion that must be ported to a new platform. The components are as follows:

You don't have to do any porting on PCSL, CLDC, MIDP, and the optional APIs, because they are internally ported to the JavaCall API already. To port to a new platform, all you have to do is the implement the JavaCall API functions to perform the actual work in the underlying OS.

For new development, the JavaCall API is recommended because it simplifies the porting process. However, it is also possible to build Java Wireless Client software without the JavaCall API. In this case, parts of PCSL, CLDC, MIDP, and each optional API must be ported separately.

FIGURE 1-2 Overall Architecture Without the JavaCall API


This book describes how to port Java Wireless Client software to a new device, both with the JavaCall API and without.


MIDP Services and Subsystems

The MIDP component is composed of a modular set of services and subsystems. Services provide functionality that all subsystems use, such as logging. Subsystems are high-level functional blocks, such as the user interface and networking.

The following table lists the Java Wireless Client software services.


TABLE 1-1 Java Wireless Client Software Services

Service

Description

Logging and tracing

Provides a way to collect information that developers can use during a porting effort or at a later stage of product development.

Native memory management

Provides a basic set of memory management routines, such as allocating and freeing memory, that all other subsystems use.

User message bundles

Provides support for localization.

Event processing

Collects and dispatches system events such as user interaction, networking, push events, I/O, and so on.

Security

Determines trust in (and permissions for) MIDlet suites and protects APIs.

Configuration

Maintains constants and properties so that they have the same definition in both the Java platform layer (Java layer) and the native platform layer. Also compiles in property values to avoid initialization overhead. See Chapter 5 for more information.


The following table lists the Java Wireless Client Software subsystems.


TABLE 1-2 Java Wireless Client Software Subsystems

Subsystem

Description

Application Management Software (AMS) and over-the-air (OTA) provisioning

Finds MIDlet suites, manages and executes them on the device

Networking

Sends and receives data

Push

Receives a communication initiated by an external entity

Record Management System (RMS)

Provides record-oriented persistent storage, enforces a permission policy for accessing the records, and enforces size constraints on the record store

Optional APIs

Mobile Service Architecture (MSA) compliant optional APIs. These optional APIs are described in the Optional Packages Porting Guide.

User Interface (LCDUI)

Interacts with the end user of a device through high-level and low-level user-interface components and supports games



Components

Java Wireless Client software subsystems and services are made up of one or more components called libraries. A library is a unit with an explicitly declared exported interface. One or more implementations of the interface can exist. Each implementation declares dependencies on other libraries whose interfaces it imports. A library can be implemented partially in the Java programming language and partially in native code.

No code is shared between alternative implementations of the same exported interface. Shared code resides in a separate library, ensuring that the interface between the shared and non-shared portion is explicitly declared. This separation makes it easy to reuse shared code in new implementations.

Platform-independent code and platform-specific code are contained in separate libraries. The interface between the platform-independent and platform-dependent libraries constitutes the porting interface as shown in FIGURE 1-3.

FIGURE 1-3 Component Implementation


Block diagram that shows the relationship between platform-independent and platform-specific libraries

Each library can have multiple implementations, each tailored to a different type of device. This architecture makes Java Wireless Client software easier to port and makes it easier to optimize performance. FIGURE 1-4 describes this architecture.

FIGURE 1-4 Modular Architecture Supporting Multiple Implementations


Diagram shows the modular architecture used to support multiple implementations

When you port the Java Wireless Client software, you choose the set of libraries most suited to your system. For each library, you can either choose one of existing implementations or provide your own implementation of the library's exported interface. Because libraries are bound at compile time, this approach has no impact on runtime performance. The build system sets aside unused libraries and implementations so the system's footprint on the device is not increased.


Control Flow

The following diagram illustrates the relationship between the different Java Wireless Client software components. It highlights how control flows between the different components.

FIGURE 1-5 Component Relationships and Flow Control


Diagram show relationships between components and flow control between the components


Device Interactions

This section describes how Java Wireless Client software fits into the platform environment. It provides a general idea of what the porting points (areas of interaction between Java Wireless Client software and the device) are. The porting points are made possible by the APIs shown in FIGURE 1-3 and FIGURE 1-6.

FIGURE 1-6 Possible APIs in Subsystems and Services


Diagram shows that subsystems can have internal APIs, public APIs, and porting APIs

FIGURE 1-7 shows a number of porting points. For example, one porting point binds Java Wireless Client software low-level graphics primitives with the graphics library of your device. Another porting point manages applications, such as Java Wireless Client software, using native code to provide Over-the-Air (OTA) provisioning required by the MIDP 2.0 Specification.

FIGURE 1-7 Porting Points


Diagrem shows porting points

FIGURE 1-8