com.funambol.syncml.spds
Class SyncManager

java.lang.Object
  extended by com.funambol.syncml.spds.SyncManager

public class SyncManager
extends java.lang.Object

The SyncManager is the engine of the synchronization process on the client library. It initializes the sync, checks the server responses and communicate with the SyncSource, which is the client-specific source of data. A client developer must prepare a SyncConfig to istantiate a SyncManager, and then can sync its sources calling the sync() method.


Field Summary
protected static int connCounter
          The connection counter used in HttpTransportAgent#sendMessage() to take trace of the number of open connections XXX: DEBUG CODE
 
Constructor Summary
SyncManager(SyncConfig conf)
          SyncManager constructor
 
Method Summary
 void setFlagSendDevInf()
          To be invoked by every change of the device configuration and if the serverUrl is a new one (i.e., not already on the list lastServerUrl
 void sync(SyncSource source)
          Synchronizes synchronization source, using the preferred sync mode defined for that SyncSource.
 void sync(SyncSource src, int syncMode)
          Synchronizes synchronization source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connCounter

protected static int connCounter
The connection counter used in HttpTransportAgent#sendMessage() to take trace of the number of open connections XXX: DEBUG CODE

Constructor Detail

SyncManager

public SyncManager(SyncConfig conf)
SyncManager constructor

Parameters:
conf - is the configuration data filled by the client
Method Detail

sync

public void sync(SyncSource source)
          throws SyncException,
                 AuthenticationException
Synchronizes synchronization source, using the preferred sync mode defined for that SyncSource.

Parameters:
source - the SyncSource to synchronize
Throws:
SyncException - If an error occurs during synchronization
AuthenticationException - If the server responded with "non authorized" return code

sync

public void sync(SyncSource src,
                 int syncMode)
          throws SyncException,
                 AuthenticationException
Synchronizes synchronization source

Parameters:
source - the SyncSource to synchronize
Throws:
SyncException - If an error occurs during synchronization
AuthenticationException - If the server responded with "non authorized" return code

setFlagSendDevInf

public void setFlagSendDevInf()
To be invoked by every change of the device configuration and if the serverUrl is a new one (i.e., not already on the list lastServerUrl

See Also:
serverUrl, isNewServerUrl


Copyright © 2006 Funambol.