org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener Interface Reference

Inheritance diagram for org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener:

org.openmobileis.modules.common.log.terminal.LogsSynchroListener org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener org.openmobileis.synchro.openmsp.client.EmptyOpenMSPSyncListener org.openmobileis.module.profiles.terminal.OpenMSPProfileSyncListener org.openmobileis.module.terminal.ModuleJarSyncListener org.openmobileis.synchro.openmsp.client.core.test.TestSynchroListener org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener org.openmobileis.synchro.openmsp.protocol.test.TestOpenMSSyncListener org.openmobileis.module.terminal.StaticModuleManagerListener org.openmobileis.database.fastobjectdb.synchro.client.OpenMSPFODBSyncListener List of all members.

Detailed Description

Title: OpenMobileIS project source
Description: Base classe that all processus involved in the synchronisation must implement.

Synchro listener are managed by the SynchroManager. The sendData method is call for sending synchronisation data and receiveData is call if there is an answer to send data. Synchronisation end when no data is added to the send data container For each listener, the synchronisation protocol manage an unique id that identity the synchronisation session; see OpenMobile Synchronisation Protocol.

Author:
Philippe Delrieu
Since:
JDK 1.1
Version:
1.0.

Definition at line 47 of file OpenMSPSyncListener.java.

Public Member Functions

void sendData (Message message) throws OpenMSPException
 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.
String getSyncName ()
 Return the name used to identiy the of the listener in the synchro processus.
void notifySynchroFailure ()
 The listener is called if the syncML command processing failed.
int getSynchroStatus ()
 Return the synchro status of the listener.
boolean isSyncOK ()
 return true if the synchronisation is OK for the listener.
void startSync (Credential cred, SynchroDescriptor synchrodescriptor) throws OpenMSPException
 Fire this event once a synchro is starting.
void endSync () throws OpenMSPException
 Fire this event once the current synchro is ended.
void receiveSyncCommand (ContainerMessage syncContainer, long newSyncNumber) throws OpenMSPException
 Event sent when the sync manager receives Sync command openML messages from the server.
void receiveMapCommand (ContainerMessage mapContainer) throws OpenMSPException
 Event sent when the sync manager receives MAP command openML messages from the server.
void receiveResultCommand (ContainerMessage resultContainer, ContainerMessage initialCommand) throws OpenMSPException
 Event sent when the sync manager receives RESULT openML messages from the server.
void receiveStatusCommand (Status statusCommande, ContainerMessage initialCommand) throws OpenMSPException
 Event sent when the sync manager receives STATUS openML messages from the server.
void receiveGetCommand (Credential cred, ContainerMessage replaceContainer, long newSyncNumber) throws OpenMSPException
 Call when the server answer container contains a GET command.
void initListener () throws OpenMSPException
 Call during listener registering.

Static Public Attributes

static final int SYNCHRO_OK = Status.STATUS_OK
static final int SYNCHRO_FAILLED = Status.STATUS_FAILED


Member Function Documentation

String org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.getSyncName (  ) 

Return the name used to identiy the of the listener in the synchro processus.

This name correspond to the source in the OpenMS protocol.

Implemented in org.openmobileis.module.profiles.terminal.OpenMSPProfileSyncListener, org.openmobileis.module.terminal.ModuleJarSyncListener, org.openmobileis.module.terminal.StaticModuleManagerListener, org.openmobileis.database.fastobjectdb.synchro.client.OpenMSPFODBSyncListener, org.openmobileis.modules.common.log.terminal.LogsSynchroListener, org.openmobileis.synchro.openmsp.client.core.test.TestSynchroListener, and org.openmobileis.synchro.openmsp.protocol.test.TestOpenMSSyncListener.

Referenced by org.openmobileis.synchro.openmsp.client.core.ListenerOrdonancer.addListener(), org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.endSync(), org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.equals(), org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.initListener(), org.openmobileis.modules.profiles.old.embedded.core.ProfileSynchroListenerAddNotifier.notifyAddListener(), org.openmobileis.module.profiles.terminal.ProfileSynchroListenerAddNotifier.notifyAddListener(), org.openmobileis.synchro.openmsp.client.OpenMSPSynchroManager.notifyFailure(), org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.notifySynchroFailure(), org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.sendData(), org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.setSynchroStatus(), and org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.startSync().

int org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.getSynchroStatus (  ) 

Return the synchro status of the listener.

The return value is defined by the OpenMSP Status class.

See also:
org.openmobileis.synchro.openmsp.protocol.Status

Implemented in org.openmobileis.modules.common.log.terminal.LogsSynchroListener, org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener, and org.openmobileis.synchro.openmsp.client.EmptyOpenMSPSyncListener.

void org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.receiveSyncCommand ( ContainerMessage  syncContainer,
long  newSyncNumber 
) throws OpenMSPException

Event sent when the sync manager receives Sync command openML messages from the server.

Parameters:
ContainerMessage container : container containing the message
long newSessionID : the session id use for this synchro for this listener message.

Implemented in org.openmobileis.modules.common.log.terminal.LogsSynchroListener, org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener, and org.openmobileis.synchro.openmsp.client.EmptyOpenMSPSyncListener.

Referenced by org.openmobileis.synchro.openmsp.client.core.OpenMSPSyncMessageFactory.receiveOpenMSPMessage().

void org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.receiveMapCommand ( ContainerMessage  mapContainer  )  throws OpenMSPException

Event sent when the sync manager receives MAP command openML messages from the server.

Parameters:
ContainerMessage container : container containing the message
long newSessionID : the session id use for this synchro for this listener message.

Implemented in org.openmobileis.module.terminal.ModuleJarSyncListener, org.openmobileis.modules.common.log.terminal.LogsSynchroListener, org.openmobileis.synchro.openmsp.client.core.test.TestSynchroListener, org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener, org.openmobileis.synchro.openmsp.client.EmptyOpenMSPSyncListener, org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener, and org.openmobileis.synchro.openmsp.protocol.test.TestOpenMSSyncListener.

Referenced by org.openmobileis.synchro.openmsp.client.core.OpenMSPSyncMessageFactory.receiveOpenMSPMessage().

void org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.receiveResultCommand ( ContainerMessage  resultContainer,
ContainerMessage  initialCommand 
) throws OpenMSPException

Event sent when the sync manager receives RESULT openML messages from the server.

Parameters:
Result resultCommande : resultCommande containing the result of a command
long newSessionID : the session id use for this synchro for this listener message.
ContainerMessage : command sent that generate the status.

Implemented in org.openmobileis.module.profiles.terminal.OpenMSPProfileSyncListener, org.openmobileis.module.terminal.ModuleJarSyncListener, org.openmobileis.modules.common.log.terminal.LogsSynchroListener, org.openmobileis.synchro.openmsp.client.core.test.TestSynchroListener, org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener, org.openmobileis.synchro.openmsp.client.EmptyOpenMSPSyncListener, org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener, and org.openmobileis.synchro.openmsp.protocol.test.TestOpenMSSyncListener.

Referenced by org.openmobileis.synchro.openmsp.client.core.OpenMSPSyncMessageFactory.receiveOpenMSPMessage().

void org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.receiveStatusCommand ( Status  statusCommande,
ContainerMessage  initialCommand 
) throws OpenMSPException

Event sent when the sync manager receives STATUS openML messages from the server.

Parameters:
Status statusCommande : resultCommande containing the Status of a command
long newSessionID : the session id use for this synchro for this listener message.
ContainerMessage : command sent that generate the status.

Implemented in org.openmobileis.module.profiles.terminal.OpenMSPProfileSyncListener, org.openmobileis.module.terminal.ModuleJarSyncListener, org.openmobileis.modules.common.log.terminal.LogsSynchroListener, org.openmobileis.synchro.openmsp.client.core.test.TestSynchroListener, org.openmobileis.synchro.openmsp.client.EmptyOpenMSPSyncListener, org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener, and org.openmobileis.synchro.openmsp.protocol.test.TestOpenMSSyncListener.

Referenced by org.openmobileis.synchro.openmsp.client.core.OpenMSPSyncMessageFactory.receiveOpenMSPMessage().

void org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.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.

Parameters:
ContainerMessage container : container containing the GET message
long newSyncNumber : the synchro number use for this synchro for this listener message.
Credential cred : the credential is any added in the GET command.

Implemented in org.openmobileis.modules.common.log.terminal.LogsSynchroListener, org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener, and org.openmobileis.synchro.openmsp.client.EmptyOpenMSPSyncListener.

Referenced by org.openmobileis.synchro.openmsp.client.core.OpenMSPSyncMessageFactory.receiveOpenMSPMessage().

void org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.initListener (  )  throws OpenMSPException

Call during listener registering.

The init occurs before the synchronisation. If an exception is throws the listener is not registered.

Exceptions:
ServiceException 

Implemented in org.openmobileis.modules.common.log.terminal.LogsSynchroListener, org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener, and org.openmobileis.synchro.openmsp.client.EmptyOpenMSPSyncListener.

Referenced by org.openmobileis.synchro.openmsp.client.OpenMSPSynchroManager.addListener().


The documentation for this interface was generated from the following file:
Generated on Mon Dec 4 11:03:42 2006 for OpenMobileIS by  doxygen 1.5.1-p1