Contents Index Adding initial data to your application Handling synchronization status information

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

Monitoring and canceling synchronization


This section describes how to monitor and cancel synchronization from UltraLite applications.

Monitoring synchronization 

To monitor synchronization, write a class that implements the UlSynchObserver interface. This interface contains a single method:

void updateSynchronizationStatus( UlSynchStatus status )

Here is a typical sequence of instructions for synchronization. In this example, the class MyObserver implements the UlSynchObserver interface:

UlSynchObserver observer = new MyObserver ();
UlSynchOptions opts = new UlSynchOptions();
// set options
opts.setUserName( "mluser" );
opts.setPassword( "mlpwd" );
opts.setStream( new UlSocketStream() );
opts.setStreamParms( "localhost" );
opts.setObserver( observer );
opts.setUserData( myDataObject );
// synchronize
conn.synchronize( opts );

Handling synchronization status information
Using the progress viewer

Contents Index Adding initial data to your application Handling synchronization status information