com.sap.ip.me.api.smartsync
Interface MessageReply


public interface MessageReply

MessageReply is used to describe communication status. Both backend and client may fire the MessageReply message. Available types of MessageReply are defined in MessageReplyType.

SmartSync notifies applications the MessageReply when applications register a MessageReplyObserver with InboxNotifier.

Example: To perform pre and post synchronization tasks.

  Class MyMessageReplyObserver implememts MessageReplyObserver{

        //Return the message types that the application needs to monitor.
        public MessageReplyType[] observeMessageReplyTypes(){
           MessageReplyType[] reply = new MessageReplyType[2];
           reply[0]=MessageReplyType.SYNC_BEGIN;
           reply[1]=MessageReplyType.SYNC_END;
           return reply;
        }

        //Action to be performed
        public messageReplyReceived(MessageReply messageReply){
           if(messageReply.getType=MessageReply.SYNC_BEGIN){
              // do pre synhronization tasks
           }
           else if(messageReply.getType=MessageReply.SYNC_END){
              // do post synhronization tasks
           }
        }
  }
  // Register the observer.
  SmartSyncRuntime.getInboxNotifier().registerMessageReplyObserver(MyMessageReplyObserver);
  
  

Since:
2.1
Author:
SAP
See Also:
MessageReplyType, MessageReplyObserver, InboxNotifier

Method Summary
 java.lang.String getMsgClass()
          Gets the class of the message reply.
 int getNumber()
          Gets the number of the message reply.
 java.lang.String getText()
          Gets the text of the MessageReply.
 MessageReplyType getType()
          Gets the type of the MessageReply.
 

Method Detail

getText

public java.lang.String getText()
Gets the text of the MessageReply.

Returns:
The text value

getType

public MessageReplyType getType()
Gets the type of the MessageReply.

Returns:
the type of the MessageReply.
See Also:
MessageReplyType

getMsgClass

public java.lang.String getMsgClass()
Gets the class of the message reply.

Returns:
the class of the message reply.

getNumber

public int getNumber()
Gets the number of the message reply.

Returns:
The number value


Copyright © 2005 SAP AG. All Rights Reserved.