Sun GlassFish Mobility Platform 1.1 Developer's Guide for Client Applications

Overview of the Mobile Client Business Object API

The Mobile Client Business Object (MCBO) API consists of the following Java classes:

See Chapter 4, Classes and Methods in the Mobile Client Business Object API Package for summaries of the fields and methods in these classes. The API documentation is also included in the Sun GlassFish Mobility Platform client bundle. In the directory where you unzipped the client bundle (see the Sun GlassFish Mobility Platform 1.1 Installation Guide for details), it is in the directory sgmp-client-1_1_01-fcs-b02/doc/mcbo/api.

The MCBO API packages provide a simple interface on top of a set of more complex packages, the com.synchronica APIs. At times an application may find it useful to call some of these APIs.

This chapter uses the Secure MusicDB sample application provided with Sun GlassFish Mobility Platform to demonstrate how to use the MCBO API. The client in this application communicates with an Enterprise Connector deployed in the gateway, which in turn communicates with a database using the Java Database Connectivity (JDBC) API.

The source code for the Secure MusicDB sample application is included in the Sun GlassFish Mobility Platform client bundle. In the directory where you unzipped the client bundle, it is in the subdirectory sgmp-client-1_1_01-fcs-b02/samples/secure-musicdb/src/mcbo. Extract the contents of the file securemusicdb-sources.jar to view the sources.

Use of security features in a Sun GlassFish Mobility Platform application is recommended, but it is not required. If you implement security, you can provide your own implementation of com.sun.mep.client.api.SecurityManager to replace com.sun.mep.client.api.DefaultSecurityManager or com.sun.mep.client.api.AESSecurityManager.

The Sun GlassFish Mobility Platform client bundle includes the source code for an additional sample client, for the Salesforce application. This client is more complex than the MusicDB client, and the code is organized differently. You can find it in the subdirectory sgmp-client-1_1_01-fcs-b02/samples/salesforce-ws/src/mcbo. Extract the contents of the file salesforce_ws-sources.jar to view the sources.

The Secure MusicDB and Salesforce sample clients can each communicate with a connector that is implemented using either the JAX-RS API or the Enterprise Connector Business Object (ECBO) API. The MCBO API client code for the applications is the same for both.