|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.syncml.spds.SyncManager
public class SyncManager
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. By default the SyncManager uses an HttpTransportAgent to communicate with the server, but the interface allows clients to specify their own transport agent.
Field Summary | |
---|---|
protected int |
alertCode
|
protected SyncSource |
source
|
Constructor Summary | |
---|---|
SyncManager(SyncConfig conf)
SyncManager constructor |
Method Summary | |
---|---|
void |
cancel()
This method cancels the current sync. |
void |
enableMappingTest(boolean isMappingTestDisabled)
Enable or disable the mappings for test purposes only |
java.lang.String |
getNextCmdID()
|
SyncReport |
getSyncReport()
This method returns the sync report of the last sync performed. |
boolean |
isBusy()
Checks if the manager is currently busy performing a synchronization. |
protected boolean |
processModifications(ChunkedString modifications)
Processes the modifications from the received response from server |
void |
setCmdProcessingOrder(java.lang.String[] newOrder)
Defines the order in which incoming items are processed by the engine. |
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 |
setTransportAgent(TransportAgent ta)
Sets the transport agent to be used for the next message to be sent. |
void |
sync(SyncSource source)
Synchronizes synchronization source, using the preferred sync mode defined for that SyncSource. |
void |
sync(SyncSource source,
boolean askServerDevInf)
Synchronizes synchronization source, using the preferred sync mode defined for that SyncSource. |
void |
sync(SyncSource src,
int syncMode)
Synchronizes synchronization source |
void |
sync(SyncSource src,
int syncMode,
boolean askServerDevInf)
Synchronizes synchronization source |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SyncSource source
protected int alertCode
Constructor Detail |
---|
public SyncManager(SyncConfig conf)
conf
- is the configuration data filled by the clientMethod Detail |
---|
public void sync(SyncSource source) throws SyncException
source
- the SyncSource to synchronize
SyncException
- If an error occurs during synchronizationpublic void sync(SyncSource source, boolean askServerDevInf) throws SyncException
source
- the SyncSource to synchronizeaskServerDevInf
- forces the sync to query for server device
information. The information is returned to the client via the
SyncListener (@see SyncListener.startSyncing)
SyncException
- If an error occurs during synchronizationpublic void sync(SyncSource src, int syncMode) throws SyncException
source
- the SyncSource to synchronizesyncMode
- the sync mode
SyncException
- If an error occurs during synchronizationpublic void sync(SyncSource src, int syncMode, boolean askServerDevInf) throws SyncException
source
- the SyncSource to synchronizesyncMode
- the sync modeaskServerDevInf
- forces the sync to query for server device
information. The information is returned to the client via the
SyncListener (@see SyncListener.startSyncing)
SyncException
- If an error occurs during synchronizationpublic void cancel()
public void setFlagSendDevInf()
lastServerUrl
public boolean isBusy()
public void setTransportAgent(TransportAgent ta)
ta
- the transport agent
java.lang.IllegalArgumentException
- if the give transport agent is nullpublic SyncReport getSyncReport()
public void setCmdProcessingOrder(java.lang.String[] newOrder)
newOrder
- an array of three items whose values must be one of:
SyncML.TAG_ADD, SyncML.TAG_REPLACE, SyncML.TAG_DELETEprotected boolean processModifications(ChunkedString modifications) throws SyncException
modifications
- The modification message from server
SyncException
public java.lang.String getNextCmdID()
public void enableMappingTest(boolean isMappingTestDisabled)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |