Contents Index Adding synchronization to your application Setting synchronization parameters

UltraLite Static Java User's Guide
  Adding Non Data Access Features to UltraLite Applications
    Adding synchronization to your application

Initializing the synchronization parameters


The synchronization parameters are stored in a C/C++ structure or Java object.

In C/C++ the members of the structure may not be well-defined on initialization. You must set your parameters to their initial values with a call to a special function. The synchronization parameters are defined in a structure declared in the UltraLite header file ulglobal.h.

In Java, the details of any synchronization, including the URL of the MobiLink synchronization server, the script version to use, the MobiLink user ID, and so on, are all held in a UlSynchOptions object.

For a complete list of synchronization parameters, see Synchronization parameters.

To initialize the synchronization parameters (Java)

  1. Create a UlSynchOptions object. For example:

    UlSynchOptions synch_options = new UlSynchOptions();
  2. Set the required parameters.

    The UlSynchOptions() object has a set of methods to set and get its fields. For a list, see Synchronization parameters. Use these methods to set the required synchronization parameters before synchronizing. For example:

    opts.setUserName( "50" );
    opts.setScriptVersion( "default" );
    opts.setStream( new UlSocketStream() );

Contents Index Adding synchronization to your application Setting synchronization parameters