|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener
Title: OpenMobileIS project source
Description: Default Synchro listener that handle OpenMS protocol for synchronisation.
Provide helper classes to facilitate the use of OpenMS protocol.
The synchroStatus is made persistent by using the ServicePropertiesManager.
Field Summary |
Fields inherited from interface org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener |
SYNCHRO_FAILLED, SYNCHRO_OK |
Constructor Summary | |
DefaultOpenMSPSyncListener()
|
Method Summary | |
protected static void |
addCredentialToCommand(Credential cred,
RequestCommand command)
Utility method that add the synchro credential to a RequestCommand. |
void |
endSync()
Fire this event once the current synchro is ended |
boolean |
equals(java.lang.Object obj)
|
protected JournalLogRenderer |
getJournalLogRenderer()
|
int |
getSynchroStatus()
Return the synchro status of the listener. |
int |
hashCode()
|
boolean |
isSyncOK()
return true if the synchronisation is OK for the listener. |
void |
notifySynchroFailure()
The listener is called if the syncML command processing failed |
protected void |
receiveAddCommand(Credential cred,
ContainerMessage addContainer,
long newSyncNumber)
Call when the server answer SYNC command container contains a ADD item. |
protected void |
receiveDeleteCommand(Credential cred,
ContainerMessage deleteContainer,
long newSyncNumber)
Call when the server answer SYNC command container contains a DELETE item. |
protected void |
receiveGetCommand(Credential cred,
ContainerMessage replaceContainer,
long newSyncNumber)
Call when the server answer SYNC command container contains a GET item. |
protected void |
receiveReplaceCommand(Credential cred,
ContainerMessage replaceContainer,
long newSyncNumber)
Call when the server answer SYNC command container contains a REPLACE item. |
void |
receiveSyncCommand(ContainerMessage syncContainer,
long newSyncNumber)
Event sent when the sync manager receives Sync command openML messages from the server |
protected void |
receiveSyncItem(Credential cred,
Item item,
long newSyncNumber)
Call when the server answer SYNC command container contains a SYNC item. |
protected void |
setSynchroStatus(int status)
update the synchro status if the specified status is less than current synchro status (more serious status) |
void |
startSync(Credential cred,
SynchroDescriptor synchrodescriptor)
Fire this event once a synchro is starting |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener |
getSyncName, receiveMapCommand, receiveResultCommand, receiveStatusCommand, sendData |
Constructor Detail |
public DefaultOpenMSPSyncListener()
Method Detail |
public boolean isSyncOK()
OpenMSPSyncListener
isSyncOK
in interface OpenMSPSyncListener
public void startSync(Credential cred, SynchroDescriptor synchrodescriptor) throws OpenMSPException
startSync
in interface OpenMSPSyncListener
OpenMSPException
public void endSync() throws OpenMSPException
OpenMSPSyncListener
endSync
in interface OpenMSPSyncListener
OpenMSPException
public int getSynchroStatus()
getSynchroStatus
in interface OpenMSPSyncListener
Status
public void notifySynchroFailure()
OpenMSPSyncListener
notifySynchroFailure
in interface OpenMSPSyncListener
public boolean equals(java.lang.Object obj)
public int hashCode()
public void receiveSyncCommand(ContainerMessage syncContainer, long newSyncNumber) throws OpenMSPException
receiveSyncCommand
in interface OpenMSPSyncListener
OpenMSPException
protected static void addCredentialToCommand(Credential cred, RequestCommand command)
protected void setSynchroStatus(int status)
protected JournalLogRenderer getJournalLogRenderer()
protected void receiveAddCommand(Credential cred, ContainerMessage addContainer, long newSyncNumber) throws OpenMSPException
OpenMSPException
protected void receiveSyncItem(Credential cred, Item item, long newSyncNumber) throws OpenMSPException
OpenMSPException
protected void receiveDeleteCommand(Credential cred, ContainerMessage deleteContainer, long newSyncNumber) throws OpenMSPException
OpenMSPException
protected void receiveReplaceCommand(Credential cred, ContainerMessage replaceContainer, long newSyncNumber) throws OpenMSPException
OpenMSPException
protected void receiveGetCommand(Credential cred, ContainerMessage replaceContainer, long newSyncNumber) throws OpenMSPException
OpenMSPException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |