org.openmobileis.synchro.openmsp.client
Class EmptyOpenMSPSyncListener

java.lang.Object
  extended byorg.openmobileis.synchro.openmsp.client.EmptyOpenMSPSyncListener
All Implemented Interfaces:
OpenMSPSyncListener

public abstract class EmptyOpenMSPSyncListener
extends java.lang.Object
implements OpenMSPSyncListener

Author:
phil

Field Summary
 
Fields inherited from interface org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener
SYNCHRO_FAILLED, SYNCHRO_OK
 
Constructor Summary
EmptyOpenMSPSyncListener()
           
 
Method Summary
 void endSync()
          Fire this event once the current synchro is ended
 int getSynchroStatus()
          Return the synchro status of the listener.
 void initListener()
          Call during listener registering.
 boolean isSyncOK()
          return true if the synchronisation is OK for the listener.
 void notifySynchroFailure()
          The listener is called if the syncML command processing failed
 void receiveGetCommand(Credential cred, ContainerMessage replaceContainer, long newSyncNumber)
          Call when the server answer container contains a GET command.
 void receiveMapCommand(ContainerMessage mapContainer)
          Event sent when the sync manager receives MAP command openML messages from the server
 void receiveResultCommand(ContainerMessage resultContainer, ContainerMessage initialCommand)
          Event sent when the sync manager receives RESULT openML messages from the server
 void receiveStatusCommand(Status statusCommande, ContainerMessage initialCommand)
          Event sent when the sync manager receives STATUS openML messages from the server
 void receiveSyncCommand(ContainerMessage syncContainer, long newSyncNumber)
          Event sent when the sync manager receives Sync command openML messages from the server
 void sendData(Message message)
          Event sent when the sync manager sends a openML message to the server The specified message is the message use to construct the synchro message This method fill the message with listener commande container.
 void startSync(Credential cred, SynchroDescriptor synchrodescriptor)
          Fire this event once a synchro is starting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener
getSyncName
 

Constructor Detail

EmptyOpenMSPSyncListener

public EmptyOpenMSPSyncListener()
Method Detail

initListener

public void initListener()
                  throws OpenMSPException
Description copied from interface: OpenMSPSyncListener
Call during listener registering. The init occurs before the synchronisation. If an exception is throws the listener is not registered.

Specified by:
initListener in interface OpenMSPSyncListener
Throws:
OpenMSPException

endSync

public void endSync()
             throws OpenMSPException
Description copied from interface: OpenMSPSyncListener
Fire this event once the current synchro is ended

Specified by:
endSync in interface OpenMSPSyncListener
Throws:
OpenMSPException

getSynchroStatus

public int getSynchroStatus()
Description copied from interface: OpenMSPSyncListener
Return the synchro status of the listener. The return value is defined by the OpenMSP Status class.

Specified by:
getSynchroStatus in interface OpenMSPSyncListener
See Also:
Status

isSyncOK

public boolean isSyncOK()
Description copied from interface: OpenMSPSyncListener
return true if the synchronisation is OK for the listener.

Specified by:
isSyncOK in interface OpenMSPSyncListener

notifySynchroFailure

public void notifySynchroFailure()
Description copied from interface: OpenMSPSyncListener
The listener is called if the syncML command processing failed

Specified by:
notifySynchroFailure in interface OpenMSPSyncListener

receiveMapCommand

public void receiveMapCommand(ContainerMessage mapContainer)
                       throws OpenMSPException
Description copied from interface: OpenMSPSyncListener
Event sent when the sync manager receives MAP command openML messages from the server

Specified by:
receiveMapCommand in interface OpenMSPSyncListener
Throws:
OpenMSPException

receiveResultCommand

public void receiveResultCommand(ContainerMessage resultContainer,
                                 ContainerMessage initialCommand)
                          throws OpenMSPException
Description copied from interface: OpenMSPSyncListener
Event sent when the sync manager receives RESULT openML messages from the server

Specified by:
receiveResultCommand in interface OpenMSPSyncListener
Throws:
OpenMSPException

receiveStatusCommand

public void receiveStatusCommand(Status statusCommande,
                                 ContainerMessage initialCommand)
                          throws OpenMSPException
Description copied from interface: OpenMSPSyncListener
Event sent when the sync manager receives STATUS openML messages from the server

Specified by:
receiveStatusCommand in interface OpenMSPSyncListener
Throws:
OpenMSPException

receiveSyncCommand

public void receiveSyncCommand(ContainerMessage syncContainer,
                               long newSyncNumber)
                        throws OpenMSPException
Description copied from interface: OpenMSPSyncListener
Event sent when the sync manager receives Sync command openML messages from the server

Specified by:
receiveSyncCommand in interface OpenMSPSyncListener
Throws:
OpenMSPException

receiveGetCommand

public void receiveGetCommand(Credential cred,
                              ContainerMessage replaceContainer,
                              long newSyncNumber)
                       throws OpenMSPException
Call when the server answer container contains a GET command. Extends this method to process GET command.

Specified by:
receiveGetCommand in interface OpenMSPSyncListener
Throws:
OpenMSPException

sendData

public void sendData(Message message)
              throws OpenMSPException
Description copied from interface: OpenMSPSyncListener
Event sent when the sync manager sends a openML message to the server The specified message is the message use to construct the synchro message This method fill the message with listener commande container.

Specified by:
sendData in interface OpenMSPSyncListener
Throws:
OpenMSPException

startSync

public void startSync(Credential cred,
                      SynchroDescriptor synchrodescriptor)
               throws OpenMSPException
Description copied from interface: OpenMSPSyncListener
Fire this event once a synchro is starting

Specified by:
startSync in interface OpenMSPSyncListener
Throws:
OpenMSPException


Copyright 2006 OpenMobileIS. All Rights Reserved.