Package com.avaya.clientservices.messaging

## Interface MessageListener

-     public interface MessageListener

  Interface that can be used to retrieve status updates for a message. One or more listeners can be registered to retrieve status updates on the messages' various attributes.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `onMessageBodyChanged​(Message message, java.lang.String body)` | Called to report that the message's body text has changed in response to a local `Message.setBodyAndReportTyping(String, MessagingCompletionHandler)` operation.
    `void` | `onMessageCapabilitiesChanged​(Message message)` | Called to report that one or more of the capabilities of the message has changed.
    `void` | `onMessageCoalescedStatusChanged​(Message message, boolean isCoalesced)` | Deprecated. THIS METHOD WILL BE REMOVED IN RELEASE VERSION 3.3.
    `void` | `onMessageDeliveryStateChanged​(Message message, MessageDeliveryState state)` | Called to report that the delivery state of the message has changed.
    `void` | `onMessageDoNotForwardStatusChanged​(Message message, boolean DoNotForward)` | Called to report that the "do not forward" status of the message has changed.
    `void` | `onMessageHasAttachmentStatusChanged​(Message message, boolean hasAttachment)` | Called to report that the list of attachments associated with the message has changed.
    `void` | `onMessageHasUnreadAttachmentStatusChanged​(Message message, boolean hasUnreadAttachment)` | Called to report that the unread attachment status of the message has changed.
    `void` | `onMessageImportanceChanged​(Message message, MessageImportance importanceLevel)` | Called to report that the importance of the message has changed.
    `void` | `onMessageInReplyToChanged​(Message message, Message newMessage)` | Called to report that the message's inReplyTo attribute has changed in response to a local `Message.setInReplyTo(Message, MessagingCompletionHandler)` operation.
    `void` | `onMessageLastModifiedDateChanged​(Message message, java.util.Date date)` | Called to report that the last modified date attribute of the message has changed.
    `void` | `onMessageReadStateChanged​(Message message, MessageReadState state)` | Called to report that the read state of the message has changed.
    `void` | `onMessageReadStatusChanged​(Message message, boolean isRead)` | Deprecated. use `onMessageReadStateChanged(Message, MessageReadState)` method instead.
    `void` | `onMessageStatusChanged​(Message message, MessageStatus status)` | Called to report that the status of the message has changed.

- - ### Method Detail

    - #### onMessageBodyChanged

          void onMessageBodyChanged​(Message message,
                                    java.lang.String body)

      Called to report that the message's body text has changed in response to a local `Message.setBodyAndReportTyping(String, MessagingCompletionHandler)` operation.
      Parameters:
        `message` - the `Message` for which the body has changed.
        `body` - the new value of the body.
      See Also:
        `Message.getBody()`

    - #### onMessageInReplyToChanged

          void onMessageInReplyToChanged​(Message message,
                                         Message newMessage)

      Called to report that the message's inReplyTo attribute has changed in response to a local `Message.setInReplyTo(Message, MessagingCompletionHandler)` operation.
      Parameters:
        `message` - the `Message` for which the inReplyTo attribute has changed.
        `newMessage` - `Message` the new inReplyTo message.
      See Also:
        `Message.hasInReplyTo()`, `Message.getInReplyTo(MessageCompletionHandler)`

    - #### onMessageLastModifiedDateChanged

          void onMessageLastModifiedDateChanged​(Message message,
                                                java.util.Date date)

      Called to report that the last modified date attribute of the message has changed.
      Parameters:
        `message` - the `Message` for which the last modified date has changed.
        `date` - the new date.
      See Also:
        `Message.getLastModifiedDate()`

    - #### onMessageCoalescedStatusChanged

          @Deprecated
          void onMessageCoalescedStatusChanged​(Message message,
                                               boolean isCoalesced)

      Deprecated.
      THIS METHOD WILL BE REMOVED IN RELEASE VERSION 3.3.
      Called to report that the message's coalesced status has changed in response to receiving additional messages.
      Parameters:
        `message` - the `Message` for which the coalesced status has changed.
        `isCoalesced` - the new value of the isCoalesced flag.
      See Also:
        `Message.isCoalesced()`

    - #### onMessageHasAttachmentStatusChanged

          void onMessageHasAttachmentStatusChanged​(Message message,
                                                   boolean hasAttachment)

      Called to report that the list of attachments associated with the message has changed.
      Parameters:
        `message` - the `Message` for which the body has changed.
        `hasAttachment` - the new value of the hasAttachment flag.
      See Also:
        `Message.hasAttachment()`, `Message.getAttachments()`

    - #### onMessageHasUnreadAttachmentStatusChanged

          void onMessageHasUnreadAttachmentStatusChanged​(Message message,
                                                         boolean hasUnreadAttachment)

      Called to report that the unread attachment status of the message has changed.
      Parameters:
        `message` - the `Message` for which the unread attachment status has changed.
        `hasUnreadAttachment` - the new value of the hasUnreadAttachment flag.
      See Also:
        `Message.hasUnreadAttachment()`

    - #### onMessageDoNotForwardStatusChanged

          void onMessageDoNotForwardStatusChanged​(Message message,
                                                  boolean DoNotForward)

      Called to report that the "do not forward" status of the message has changed.
      Parameters:
        `message` - the `Message` for which the "do not forward" status has changed.
        `DoNotForward` - the new value of the DoNotForward flag.
      See Also:
        `Message.isDoNotForward()`

    - #### onMessageReadStatusChanged

          void onMessageReadStatusChanged​(Message message,
                                          boolean isRead)

      Deprecated.
      use `onMessageReadStateChanged(Message, MessageReadState)` method instead.
      Called to report that the "is read" status of the message has changed.
      Parameters:
        `message` - the `Message` for which the "is read" status has changed.
        `isRead` - the new value of the isRead flag.
      See Also:
        `Message.isRead()`

    - #### onMessageReadStateChanged

          void onMessageReadStateChanged​(Message message,
                                         MessageReadState state)

      Called to report that the read state of the message has changed.
      Parameters:
        `message` - the `Message` for which the "read" state has changed.
        `state` - the new value of the read state.
      See Also:
        `Message.getReadState()`

    - #### onMessageDeliveryStateChanged

          void onMessageDeliveryStateChanged​(Message message,
                                             MessageDeliveryState state)

      Called to report that the delivery state of the message has changed.
      Parameters:
        `message` - the `Message` for which the "delivery" state has changed.
        `state` - the new value of the delivery state.
      See Also:
        `Message.getDeliveryState()`

    - #### onMessageStatusChanged

          void onMessageStatusChanged​(Message message,
                                      MessageStatus status)

      Called to report that the status of the message has changed.
      Parameters:
        `message` - the `Message` for which the status has changed.
        `status` - the new value of the message status.
      See Also:
        `Message.getStatus()`

    - #### onMessageImportanceChanged

          void onMessageImportanceChanged​(Message message,
                                          MessageImportance importanceLevel)

      Called to report that the importance of the message has changed.
      Parameters:
        `message` - the `Message` for which the importance has changed.
        `importanceLevel` - the new value of the importance level.
      See Also:
        `Message.getImportance()`

    - #### onMessageCapabilitiesChanged

          void onMessageCapabilitiesChanged​(Message message)

      Called to report that one or more of the capabilities of the message has changed. The application should query each of the capabilities and enable/disable elements of the user interface based on the new capability settings. Capabilities can change as a result of local or remote actions.
      Parameters:
        `message` - the `Message` that the callback is associated with.
      See Also:
        `Message.getDeliveryDetailsCapability()`, `Message.getRemoveCapability()`, `Message.getCreateAttachmentCapability()`, `Message.getMarkAsReadCapability()`, `Message.getSendCapability()`, `Message.getUpdateBodyCapability()`, `Message.getUpdateDoNotForwardCapability()`, `Message.getUpdateImportanceCapability()`, `Message.getUpdateInReplyToCapability()`