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

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

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

org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener org.openmobileis.synchro.openmsp.client.core.test.TestSynchroListener org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener org.openmobileis.synchro.openmsp.protocol.test.TestOpenMSSyncListener org.openmobileis.database.fastobjectdb.synchro.client.OpenMSPFODBSyncListener List of all members.

Detailed Description

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.

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

Definition at line 45 of file DefaultOpenMSPSyncListener.java.

Public Member Functions

boolean isSyncOK ()
 return true if the synchronisation is OK for the listener.
 DefaultOpenMSPSyncListener ()
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.
int getSynchroStatus ()
 Return the synchro status of the listener.
void notifySynchroFailure ()
 The listener is called if the syncML command processing failed.
boolean equals (Object obj)
int hashCode ()
void receiveSyncCommand (ContainerMessage syncContainer, long newSyncNumber) throws OpenMSPException
 Event sent when the sync manager receives Sync command openML messages from the server.

Protected Member Functions

void setSynchroStatus (int status)
 update the synchro status if the specified status is less than current synchro status (more serious status)
JournalLogRenderer getJournalLogRenderer ()
void receiveAddCommand (Credential cred, ContainerMessage addContainer, long newSyncNumber) throws OpenMSPException
 Call when the server answer SYNC command container contains a ADD item.
void receiveSyncItem (Credential cred, Item item, long newSyncNumber) throws OpenMSPException
 Call when the server answer SYNC command container contains a SYNC item.
void receiveDeleteCommand (Credential cred, ContainerMessage deleteContainer, long newSyncNumber) throws OpenMSPException
 Call when the server answer SYNC command container contains a DELETE item.
void receiveReplaceCommand (Credential cred, ContainerMessage replaceContainer, long newSyncNumber) throws OpenMSPException
 Call when the server answer SYNC command container contains a REPLACE item.
void receiveGetCommand (Credential cred, ContainerMessage replaceContainer, long newSyncNumber) throws OpenMSPException
 Call when the server answer SYNC command container contains a GET item.

Static Protected Member Functions

static void addCredentialToCommand (Credential cred, RequestCommand command)
 Utility method that add the synchro credential to a RequestCommand.


Member Function Documentation

int org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.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

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

Definition at line 90 of file DefaultOpenMSPSyncListener.java.

void org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveAddCommand Credential  cred,
ContainerMessage  addContainer,
long  newSyncNumber
throws OpenMSPException [protected]
 

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

Extends this method to process ADD item.

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

Definition at line 184 of file DefaultOpenMSPSyncListener.java.

void org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveDeleteCommand Credential  cred,
ContainerMessage  deleteContainer,
long  newSyncNumber
throws OpenMSPException [protected]
 

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

Extends this method to process DELETE item.

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

Definition at line 202 of file DefaultOpenMSPSyncListener.java.

void org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveGetCommand Credential  cred,
ContainerMessage  replaceContainer,
long  newSyncNumber
throws OpenMSPException [protected]
 

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

Extends this method to process GET item.

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

Definition at line 220 of file DefaultOpenMSPSyncListener.java.

void org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveReplaceCommand Credential  cred,
ContainerMessage  replaceContainer,
long  newSyncNumber
throws OpenMSPException [protected]
 

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

Extends this method to process REPLACE item.

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

Definition at line 211 of file DefaultOpenMSPSyncListener.java.

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

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

Definition at line 128 of file DefaultOpenMSPSyncListener.java.

References org.openmobileis.synchro.openmsp.protocol.RequestCommand.getCrendential(), org.openmobileis.synchro.openmsp.protocol.ContainerMessage.getElement(), and org.openmobileis.synchro.openmsp.protocol.Element.getElementType().

void org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveSyncItem Credential  cred,
Item  item,
long  newSyncNumber
throws OpenMSPException [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 in org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener.

Definition at line 193 of file DefaultOpenMSPSyncListener.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