Inheritance diagram for org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener:
Provide helper classes to facilitate the use of OpenMS protocol. The synchroStatus is made persistent by using the ServicePropertiesManager.
Definition at line 46 of file DefaultOpenMSPSyncListener.java.
Public Member Functions | |
boolean | isSyncOK () |
return true if the synchronisation is OK for the listener. | |
DefaultOpenMSPSyncListener () | |
void | initListener () throws OpenMSPException |
Call during listener registering. | |
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. | |
void | receiveGetCommand (Credential cred, ContainerMessage replaceContainer, long newSyncNumber) throws OpenMSPException |
Call when the server answer SYNC command container contains a GET item. | |
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. | |
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. | |
Static Protected Member Functions | |
static void | addCredentialToCommand (Credential cred, RequestCommand command) |
Utility method that add the synchro credential to a RequestCommand. | |
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 |
void org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.initListener | ( | ) | throws OpenMSPException |
Call during listener registering.
The init occurs before the synchronisation. If an exception is throws the listener is not registered.
ServiceException |
Implements org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.
Definition at line 68 of file DefaultOpenMSPSyncListener.java.
References org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.ADD_ERROR_MESSAGE, org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.DELETE_ERROR_MESSAGE, org.openmobileis.common.intl.IntlResourceManager.getLocalizedProperty(), org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.getSyncName(), org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.ITEM_ERROR_MESSAGE, org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.SYNC_ERROR_MESSAGE, org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.SYNC_UNAUTHORIZED_MESSAGE, and org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.UPDATE_ERROR_MESSAGE.
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.
Implements org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener.
Definition at line 107 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.
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 145 of file DefaultOpenMSPSyncListener.java.
References org.openmobileis.synchro.openmsp.protocol.RequestCommand.getCrendential(), org.openmobileis.synchro.openmsp.protocol.Element.getElementType(), org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveAddCommand(), org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveDeleteCommand(), org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveReplaceCommand(), and org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveSyncItem().
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.
ContainerMessage | container : container containing the message | |
long | newSessionID : the session id use for this synchro for this listener message. |
Definition at line 199 of file DefaultOpenMSPSyncListener.java.
Referenced by org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveSyncCommand().
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.
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 208 of file DefaultOpenMSPSyncListener.java.
Referenced by org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveSyncCommand().
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.
ContainerMessage | container : container containing the message | |
long | newSessionID : the session id use for this synchro for this listener message. |
Definition at line 217 of file DefaultOpenMSPSyncListener.java.
Referenced by org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveSyncCommand().
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.
ContainerMessage | container : container containing the message | |
long | newSessionID : the session id use for this synchro for this listener message. |
Definition at line 226 of file DefaultOpenMSPSyncListener.java.
Referenced by org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveSyncCommand().
void org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveGetCommand | ( | Credential | cred, | |
ContainerMessage | replaceContainer, | |||
long | newSyncNumber | |||
) | throws OpenMSPException |
Call when the server answer SYNC command container contains a GET item.
Extends this method to process GET item.
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 235 of file DefaultOpenMSPSyncListener.java.
void org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveMapCommand | ( | ContainerMessage | mapContainer | ) | throws OpenMSPException |
Event sent when the sync manager receives MAP command openML messages from the server.
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.
Reimplemented in org.openmobileis.module.terminal.ModuleJarSyncListener, org.openmobileis.synchro.openmsp.client.core.test.TestSynchroListener, org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener, and org.openmobileis.synchro.openmsp.protocol.test.TestOpenMSSyncListener.
Definition at line 243 of file DefaultOpenMSPSyncListener.java.
void org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener.receiveResultCommand | ( | ContainerMessage | resultContainer, | |
ContainerMessage | initialCommand | |||
) | throws OpenMSPException |
Event sent when the sync manager receives RESULT openML messages from the server.
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.
Reimplemented in 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, and org.openmobileis.synchro.openmsp.protocol.test.TestOpenMSSyncListener.
Definition at line 252 of file DefaultOpenMSPSyncListener.java.