Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

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 63 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 ()
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

Static Protected Attributes

static String ADD_ERROR_MESSAGE
static String UPDATE_ERROR_MESSAGE
static String DELETE_ERROR_MESSAGE
static String ITEM_ERROR_MESSAGE
static String SYNC_ERROR_MESSAGE
static String SYNC_UNAUTHORIZED_MESSAGE


Member Function Documentation

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.

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 379 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 335 of file OpenMSPDBSyncListener.java.

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

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.

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 410 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 

Definition at line 390 of file OpenMSPDBSyncListener.java.

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.

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

Definition at line 206 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.

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

Definition at line 224 of file OpenMSPDBSyncListener.java.

References org.openmobileis.synchro.openmsp.protocol.DataItem.getData(), org.openmobileis.synchro.openmsp.protocol.DataItem.getMetaInformation(), org.openmobileis.synchro.openmsp.protocol.Result.getMetaInformation(), and org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.getSyncName().

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 250 of file OpenMSPDBSyncListener.java.

References org.openmobileis.synchro.openmsp.protocol.AbstractCommand.getElementType(), and org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.getSyncName().

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 327 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 402 of file OpenMSPDBSyncListener.java.


The documentation for this class was generated from the following file:
Generated on Wed Dec 14 21:05:40 2005 for OpenMobileIS by  doxygen 1.4.4