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  int alertCode
           
protected  SyncSource source
           
 
Constructor Summary
SyncManager(SyncConfig conf)
          SyncManager constructor
 
Method Summary
 void enableMappingTest(boolean isMappingTestDisabled)
          Enable or disable the mappings for test purposes only
 java.lang.String getNextCmdID()
           
 boolean isBusy()
           
protected  boolean processModifications(ChunkedString modifications)
          Processes the modifications from the received response from server
 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

source

protected SyncSource source

alertCode

protected int alertCode
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
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

sync

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

Parameters:
source - the SyncSource to synchronize
syncMode - the sync mode
Throws:
SyncException - If an error occurs during synchronization

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


isBusy

public boolean isBusy()

processModifications

protected boolean processModifications(ChunkedString modifications)
                                throws SyncException
Processes the modifications from the received response from server

Parameters:
modifications - The modification message from server
Returns:
true if a response message is required, false otherwise
Throws:
SyncException

getNextCmdID

public java.lang.String getNextCmdID()

enableMappingTest

public void enableMappingTest(boolean isMappingTestDisabled)
Enable or disable the mappings for test purposes only



Copyright © 2006 Funambol.