org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener Class Reference

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

org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener org.openmobileis.database.fastobjectdb.synchro.client.OpenMSPFODBSyncListener List of all members.

Detailed Description

Title: OpenMobileIS project source
Description:.

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

Definition at line 62 of file OpenMSPDBSyncListener.java.

Public Member Functions

 OpenMSPDBSyncListener ()
void startSync (Credential cred, SynchroDescriptor synchrodescriptor) throws OpenMSPException
 Fire this event once a synchro is starting.
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.
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 initialContenaire) throws OpenMSPException
 Event sent when the sync manager receives STATUS openML messages from the server.
void notifySyncDataDone (String pdaID, int actionType) throws OpenMSPException
 Call when a client data modification (ActionDB) has been update on the server side.

Protected Member Functions

void manageReturnStatusLog (int statusCode, int cmlType, ContainerMessage container)
 notify when receiving a status commnand the status code, the CMLElement type of the send command and the container containing the command.
void receiveSyncItem (Credential cred, Item item, long newSyncNumber)
 Call when the server answer SYNC command container contains a SYNC item.
byte[] getSyncDataForAtomicObjectUID (String pdaUID, int action) throws OpenMSPException
 return the data to add to the synchro command ADD OR REPLACE.
String getSendCommandMetaData () throws OpenMSPException
String getServerUIDForAOUID (String pdaUID)
 return the server uid for the specified pdaUID.
void notifyMAPofUID (String pdauid, String serveruid) throws OpenMSPException
void removeServerUIDForAOUID (String pdaUID) throws OpenMSPException
 remove the pda uid associated server uid.
void importCompletSynchroDatabaseFile (String importFile) throws DatabaseException
 Call during complete synchronisation to dump the database with server data store in the specified file name.
abstract String[] getDBDataForAdd (String pdaUID) throws OpenMSPException
 return the data conforme to the disptacher create AbstractQueryManager method for specified pdaUID .
abstract String[] getDBDataForReplace (String pdaUID) throws OpenMSPException
 return the data conforme to the disptacher update AbstractQueryManager method for specified pdaUID .
abstract String getSynchroTarget ()
 return the target of the SYNC command use to synchronize listener data.
abstract Credential getSyncroCredential ()
 return the credential to use for data synchronization.
abstract ImportQueryManager getImportQueryManager ()
 return the ImportQueryManager use to make synchro data import.

Protected Attributes

String installPath


Member Function Documentation

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

Reimplemented from org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.

Definition at line 197 of file OpenMSPDBSyncListener.java.

References org.openmobileis.synchro.openmsp.protocol.Item.getSource(), and org.openmobileis.synchro.openmsp.protocol.Item.getTarget().

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

Reimplemented from org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.

Definition at line 215 of file OpenMSPDBSyncListener.java.

References org.openmobileis.synchro.openmsp.protocol.Result.getMetaInformation().

void org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.receiveStatusCommand ( Status  statusCommande,
ContainerMessage  initialContenaire 
) 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.

Implements org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.

Definition at line 241 of file OpenMSPDBSyncListener.java.

References org.openmobileis.synchro.openmsp.protocol.AbstractCommand.getElementType().

void org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.receiveSyncItem ( Credential  cred,
Item  item,
long  newSyncNumber 
) [protected]

Call when the server answer SYNC command container contains a SYNC item.

Extends this method to process SYNC item.

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

Reimplemented from org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.

Definition at line 320 of file OpenMSPDBSyncListener.java.

byte [] org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.getSyncDataForAtomicObjectUID ( String  pdaUID,
int  action 
) throws OpenMSPException [protected]

return the data to add to the synchro command ADD OR REPLACE.

The format must be the same has the one use on dispatcher size. the default implementation call getDBDataForAdd() getDBDataForReplace() repending on the action and encode the result

Definition at line 328 of file OpenMSPDBSyncListener.java.

String org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.getServerUIDForAOUID ( String  pdaUID  )  [protected]

return the server uid for the specified pdaUID.

Atomiv Object uid can be different on the server side and on the pda size. This method return the server uid use on server side to reference the pda uid specified. return null if not found.

Definition at line 372 of file OpenMSPDBSyncListener.java.

void org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.notifySyncDataDone ( String  pdaID,
int  actionType 
) throws OpenMSPException

Call when a client data modification (ActionDB) has been update on the server side.

The actionType is defined by the class ActionDB.

Parameters:
pdaID : Id of the object updated on the server side.
actionType ActionDB modification type
Exceptions:
OpenMSPException 

Reimplemented in org.openmobileis.database.fastobjectdb.synchro.client.OpenMSPFODBSyncListener.

Definition at line 383 of file OpenMSPDBSyncListener.java.

void org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.removeServerUIDForAOUID ( String  pdaUID  )  throws OpenMSPException [protected]

remove the pda uid associated server uid.

this method is call when a delete commande from the PDA is has been done to the server. delete AO server id must be deleted to the pda too.

Definition at line 395 of file OpenMSPDBSyncListener.java.

void org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.importCompletSynchroDatabaseFile ( String  importFile  )  throws DatabaseException [protected]

Call during complete synchronisation to dump the database with server data store in the specified file name.

Parameters:
importFile : file containing server dump data file.

Reimplemented in org.openmobileis.database.fastobjectdb.synchro.client.OpenMSPFODBSyncListener.

Definition at line 403 of file OpenMSPDBSyncListener.java.

abstract String [] org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.getDBDataForAdd ( String  pdaUID  )  throws OpenMSPException [protected, pure virtual]

return the data conforme to the disptacher create AbstractQueryManager method for specified pdaUID .

Return null if no data found

Implemented in org.openmobileis.database.fastobjectdb.synchro.client.OpenMSPFODBSyncListener.

abstract String [] org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.getDBDataForReplace ( String  pdaUID  )  throws OpenMSPException [protected, pure virtual]

return the data conforme to the disptacher update AbstractQueryManager method for specified pdaUID .

Return null if no data found

Implemented in org.openmobileis.database.fastobjectdb.synchro.client.OpenMSPFODBSyncListener.

abstract Credential org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.getSyncroCredential (  )  [protected, pure virtual]

return the credential to use for data synchronization.

If no need return null.

Implemented in org.openmobileis.database.fastobjectdb.synchro.client.OpenMSPFODBSyncListener.


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