Contents Index Adding synchronization to your application Initiating synchronization pdf/preface.pdf

UltraLite User's Guide
  Developing UltraLite Java Applications
    Adding synchronization to your application

Initializing the synchronization options


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.

Before synchronizing, initialize the synchronization parameters as follows:

UlSynchOptions opts = new UlSynchOptions();

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() );
Notes 

The synchronization streams for UltraLite Java applications are objects, and are set by their constructors. The available streams are as follows:

The following line sets the stream to TCP/IP:

synch_opts.setStream( new UlSocketStream() );

For more information, see Synchronization parameters.

Separately-licensable option required 
Use of UlHTTPSStream, UlSecureSocketStream and UlSecureRSASocketStream require Certicom technology, which in turn requires that you obtain the separately-licensable SQL Anywhere Studio security option and is subject to export regulations. For more information on this option, see Welcome to SQL Anywhere Studio.

Contents Index Adding synchronization to your application Initiating synchronization pdf/preface.pdf