Java Reference
In-Depth Information
In case the idea of some automatic Java-to-native-code generator or
any other magic tool that binds the Java world to the native world springs
to mind, such a tool does not exist and was never considered as a
solution that would be able to handle all the requirements and generate
a fit-for-purpose integration of JSRs.
The solutions to the JSR integration challenges were developed by
applying generic software-engineering solutions, such as applying rel-
evant structural design patterns (e.g., the Adapter, Bridge, Proxy, and
Fa¬łade patterns) in the places where they fit and developing idiomatic
solutions to idiomatic challenges. For example, the Java Event Server (JES)
that was described in Chapter 10 is used heavily in every JSR that inte-
grates with asynchronous Symbian C++ APIs. Most of all, it was neither
technology nor patterns that did the trick but the hard work and creativity
of a team of expert engineers - the Java group in Symbian Ltd.
11.5 Examples of JSR Integration
Let us now discuss various Java ME JSRs and their integration approach.
We start with two cases of integration at opposite extremes: integration
is mandatory for JSR-75 FileConnection and there is no integration at
all for JSR-172 Web Services, which uses a pure Java implementation.
With those two JSRs, we learn that opposing integration approaches can
coexist in the Java ME subsystem and we also get a first glance into how
a Java ME API is integrated onto a native Symbian OS API.
We then consider the integration of the most well-used APIs: JSR-118
MIDP 2.0 LCDUI API, JSR-135 MMAPI and JSR-118 MIDP 2.0 Media
API. UI and multimedia are probably the most common features of every
mobile Java application. But apart from the importance of these APIs,
they are interesting and challenging integration cases.
We then look at the integration of JSR-248 MSA Components, JSR-
177 SATSA APDU and JSR-180 SIP. JSR-177 and JSR-180 are newer
JSRs that are part of JSR-248 MSA full. Their integration provides an
interesting insight into how different the Java and native worlds can be,
yet integration must still be delivered.
Please note that the focus of this discussion is the integration of the
JSRs and not the JSRs themselves.
11.5.1 Mandatory Integration: JSR-75 FileConnection
The FileConnection API is an optional package of JSR-75 3 that facilitates
access to the device file system and removable media (e.g., memory
\ src \ common \ generic \ j2me \
components \ file in the Symbian OS source repository.
3 JSR-75 FileConnection implementation is under
Search WWH ::




Custom Search