com.sap.ip.me.api.smartsync
Class MessageReplyType

java.lang.Object
  extended bycom.sap.ip.me.api.smartsync.MessageReplyType
All Implemented Interfaces:
java.io.Serializable

public final class MessageReplyType
extends java.lang.Object
implements java.io.Serializable

An enumeration of possible SmartSync message reply types. List of the messages are

  • SUCCESS
  • ERROR
  • RESET_SUCCESS
  • RESET_FAILURE
  • SYNC_BEGIN
  • SYNC_END

    Version:
    2.1
    Author:
    SAP
    See Also:
    MessageReply, MessageReplyObserver, Serialized Form

    Field Summary
    static MessageReplyType ERROR
              MessageReplyType.ERROR is fired for the following cases:
    the sync-layer between backend and device cannot deliver an upload message by trying multiple times.
    static MessageReplyType RESET_FAILURE
              MessageReplyType.RESET_FAILURE is returned from the backend as a negative confirmation message to the device reset request message sent by the client device.
    static MessageReplyType RESET_SUCCESS
              MessageReplyType.RESET_SUCCESS is fired from the backend as a positive confirmation message to the device reset request message sent by the client device.
    static MessageReplyType SUCCESS
              MessageReplyType.SUCCESS is fired for the following cases:
    To response a download request message from device, and in case there is no delta data available on backend for the requested SyncBo, backend returns a MessageReply with the type is gSUCCESS h.
    static MessageReplyType SYNC_BEGIN
              MessageReplyType.SYNC_BEGIN is fired by the SmartSync client as soon as the synchronization starts.
    static MessageReplyType SYNC_END
              MessageReplyType.SYNC_END is fired by the SmartSync client when all synchronization tasks are completed.
     
    Method Summary
    static MessageReplyType forString(java.lang.String typeString)
              Returns the corresponding MessageReplyType object for the specified type
     java.lang.String toString()
              Returns the text description of this MessageReplyType object.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    SUCCESS

    public static MessageReplyType SUCCESS
    MessageReplyType.SUCCESS is fired for the following cases:
    To response a download request message from device, and in case there is no delta data available on backend for the requested SyncBo, backend returns a MessageReply with the type is gSUCCESS h.

    It does not make much sense for application.


    ERROR

    public static MessageReplyType ERROR
    MessageReplyType.ERROR is fired for the following cases:
  • the sync-layer between backend and device cannot deliver an upload message by trying multiple times. The original message is returned as error sync-container and SmartSync converts the error sync-container this MessageReplyType.
  • the upload message is somehow corrupted or an incorrect message, which cannot be parsed on backend. The original message is returned as an error sync-container which SmartSync converts into a MessageReplyType.ERROR.
  • SmartSync client fire a MessageReply having a type ERROR when SmartSync cannot properly parse and handle an inbound message.

    When application receives this MessageReply, it is recommended the application to reset data store in order to keep the consistency between server and client. This can be done by using the following API: SyncBoDeltaRequestFacade.setGlobalResetProcessing(GlobalResetProcessing) .


  • RESET_SUCCESS

    public static MessageReplyType RESET_SUCCESS
    MessageReplyType.RESET_SUCCESS is fired from the backend as a positive confirmation message to the device reset request message sent by the client device.

    When the type is MessageReplyType.RESET_SUCCESS, SmartSync removes all data in local data store. Application is ready to send a download request message.


    RESET_FAILURE

    public static MessageReplyType RESET_FAILURE
    MessageReplyType.RESET_FAILURE is returned from the backend as a negative confirmation message to the device reset request message sent by the client device.

    When the type is MessageReplyType.RESET_FAILURE, it is recommended the application to reset data store in order to keep the consistency between server and client.


    SYNC_BEGIN

    public static MessageReplyType SYNC_BEGIN
    MessageReplyType.SYNC_BEGIN is fired by the SmartSync client as soon as the synchronization starts.

    The MessageReply is not a true message reply, more like a notification event to application. Application may use this MessageReply to handle pre-synchronization tasks.


    SYNC_END

    public static MessageReplyType SYNC_END
    MessageReplyType.SYNC_END is fired by the SmartSync client when all synchronization tasks are completed.

    The MessageReply is not a true message reply, more like a notification event to application. Application may use this MessageReply to handle post-synchronization tasks.

    Method Detail

    forString

    public static MessageReplyType forString(java.lang.String typeString)
    Returns the corresponding MessageReplyType object for the specified type

    Parameters:
    typeString - the text descrption of the MessageReplyType object: either SUCCESS, ERROR, RESET_SUCCESS, RESET_FAILURE, SYNC_BEGIN or SYNC_END
    Returns:
    the MessageReplyType object for a specified type

    toString

    public java.lang.String toString()
    Returns the text description of this MessageReplyType object.

    Returns:
    the text descrption: either SUCCESS, ERROR, RESET_SUCCESS, RESET_FAILURE, SYNC_BEGIN or SYNC_END


    Copyright © 2005 SAP AG. All Rights Reserved.