UltraLite User's Guide
Developing UltraLite Java Applications
UltraLite provides the following features for monitoring synchronization:
The UlSynchObserver interface for monitoring synchronization progress and for canceling synchronization.
A progress indicator component that implements the interface, which you can add to your application.
To monitor synchronization from an UltraLite Java application, you write a class that implements the UlSynchObserver interface. This interface contains a single method:
void updateSynchronizationStatus( UlSynchStatus status )
The overall process for monitoring synchronization is as follows:
Register your UlSynchObserver object using the UlSynchOptions class.
Call the synchronize() method to synchronize.
The updateSynchronizationStatus method of your observer class is called whenever the synchronization state changes. The following section describes the synchronization state.
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 );
Implementing the UlSynchObserver interface
Using the progress viewer