Package com.avaya.core

## Class ConversationDelegateAdapter

- java.lang.Object
- - com.avaya.core.ConversationDelegateAdapter

- All Implemented Interfaces:
    `ConversationDelegate`

      public abstract class ConversationDelegateAdapter
      extends java.lang.Object
      implements ConversationDelegate

  Abstract class that implements `ConversationDelegate` so individual methods can be overridden.

- - ### Field Summary

    - ### Fields inherited from interface com.avaya.core.ConversationDelegate

      `INTEGRATOR_DELEGATE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ConversationDelegateAdapter()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `onAvMessagingSdkConnectionStatusChanged​(AvMessagingSdkConnectionStatus status)` | Notifies the delegate when the user's connection to AvMessagingSdk has changed.
    `void` | `onAvMessagingSdkHidden()` | Notifies the delegate when the AvMessagingSdk Conversation is hidden.
    `void` | `onAvMessagingSdkShown()` | Notifies the delegate when the AvMessagingSdk Conversation is shown.
    `void` | `onCardSummaryLoaded​(CardSummary cardSummary)` | Notifies the delegate when a saved stripe card is loaded.
    `void` | `onConversationEventReceived​(ConversationEvent conversationActivity)` | Notifies the delegate of a new activity.
    `void` | `onConversationsListUpdated​(java.util.List<Conversation> conversationsList)` | Notifies the delegate when the conversations list was updated.
    `void` | `onInitializationStatusChanged​(InitializationStatus status)` | Notifies the delegate of a change in Initialization status.
    `void` | `onLoginComplete​(LoginResult result)` | Notifies the delegate when a call to `AvMessagingSdk.login(String, String, AvMessagingSdkCallback)` is complete
    `void` | `onLogoutComplete​(LogoutResult result)` | Notifies the delegate when a call to `AvMessagingSdk.logout(AvMessagingSdkCallback)` is complete
    `void` | `onMessageSent​(Message message, MessageUploadStatus status)` | Notifies the delegate of a message being sent.
    `void` | `onMessagesReceived​(Conversation conversation, java.util.List<Message> messages)` | Notifies the delegate of new incoming messages.
    `void` | `onMessagesReset​(Conversation conversation, java.util.List<Message> messages)` | Notifies the delegate the messages in a conversation have been reset.
    `void` | `onPaymentProcessed​(MessageAction messageAction, PaymentStatus status)` | Notifies the delegate when payment is processed.
    `void` | `onUnreadCountChanged​(Conversation conversation, int unreadCount)` | Notifies the delegate of a change in unread message count.
    `boolean` | `shouldTriggerAction​(MessageAction messageAction)` | Allows a delegate to override default action behavior.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConversationDelegateAdapter

          public ConversationDelegateAdapter()

  - ### Method Detail

    - #### onMessagesReceived

          public void onMessagesReceived​(Conversation conversation,
                                         java.util.List<Message> messages)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate of new incoming messages.

      Called when new messages are received from the server.

      Specified by:
        `onMessagesReceived` in interface `ConversationDelegate`
      Parameters:
        `conversation` - The conversation object.
        `messages` - A list of Message objects representing the new messages.
      See Also:
        `ConversationDelegate.onMessagesReceived(Conversation, List)`

    - #### onMessagesReset

          public void onMessagesReset​(Conversation conversation,
                                      java.util.List<Message> messages)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate the messages in a conversation have been reset.

      Called when new messages are received from the server that do not match locally stored cache or if a different conversation was loaded.

      Specified by:
        `onMessagesReset` in interface `ConversationDelegate`
      Parameters:
        `conversation` - The conversation object.
        `messages` - A list of Message objects representing the new messages.
      See Also:
        `ConversationDelegate.onMessagesReset(Conversation, List)`

    - #### onUnreadCountChanged

          public void onUnreadCountChanged​(Conversation conversation,
                                           int unreadCount)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate of a change in unread message count.

      Called when conversation data is fetched from the server, or when the user enters the conversation activity.

      Specified by:
        `onUnreadCountChanged` in interface `ConversationDelegate`
      Parameters:
        `conversation` - The conversation object
        `unreadCount` - The count of unread messages
      See Also:
        `ConversationDelegate.onUnreadCountChanged(Conversation, int)`

    - #### onMessageSent

          public void onMessageSent​(Message message,
                                    MessageUploadStatus status)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate of a message being sent.

      Called once the message has been sent successfully or not.

      Specified by:
        `onMessageSent` in interface `ConversationDelegate`
      Parameters:
        `message` - The message that was sent
        `status` - The status of the message that was sent
      See Also:
        `ConversationDelegate.onMessageSent(Message, MessageUploadStatus)`

    - #### onConversationEventReceived

          public void onConversationEventReceived​(ConversationEvent conversationActivity)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate of a new activity.

      Called when a new activity is received from the server

      Specified by:
        `onConversationEventReceived` in interface `ConversationDelegate`
      Parameters:
        `conversationActivity` - The conversationActivity that was received
      See Also:
        `ConversationDelegate.onConversationEventReceived(ConversationEvent)`

    - #### onInitializationStatusChanged

          public void onInitializationStatusChanged​(InitializationStatus status)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate of a change in Initialization status.

      Specified by:
        `onInitializationStatusChanged` in interface `ConversationDelegate`
      Parameters:
        `status` - The new status
      See Also:
        `ConversationDelegate.onInitializationStatusChanged(InitializationStatus)`

    - #### onLoginComplete

          public void onLoginComplete​(LoginResult result)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate when a call to `AvMessagingSdk.login(String, String, AvMessagingSdkCallback)` is complete
      Specified by:
        `onLoginComplete` in interface `ConversationDelegate`
      Parameters:
        `result` - The login result
      See Also:
        `ConversationDelegate.onLoginComplete(LoginResult)`

    - #### onLogoutComplete

          public void onLogoutComplete​(LogoutResult result)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate when a call to `AvMessagingSdk.logout(AvMessagingSdkCallback)` is complete
      Specified by:
        `onLogoutComplete` in interface `ConversationDelegate`
      Parameters:
        `result` - The logout result
      See Also:
        `ConversationDelegate.onLogoutComplete(LogoutResult)`

    - #### onPaymentProcessed

          public void onPaymentProcessed​(MessageAction messageAction,
                                         PaymentStatus status)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate when payment is processed.

      Specified by:
        `onPaymentProcessed` in interface `ConversationDelegate`
      Parameters:
        `messageAction` - The purchased message action
        `status` - The status of the payment
      See Also:
        `ConversationDelegate.onPaymentProcessed(MessageAction, PaymentStatus)`

    - #### shouldTriggerAction

          public boolean shouldTriggerAction​(MessageAction messageAction)

      Description copied from interface: `ConversationDelegate`
      Allows a delegate to override default action behavior.

      Called when the user taps a message action.

      Specified by:
        `shouldTriggerAction` in interface `ConversationDelegate`
      Parameters:
        `messageAction` - The message action that was tapped.
      Returns:
        false to prevent default behaviour of message action click, true otherwise
      See Also:
        `ConversationDelegate.shouldTriggerAction(MessageAction)`

    - #### onCardSummaryLoaded

          public void onCardSummaryLoaded​(CardSummary cardSummary)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate when a saved stripe card is loaded.

      Called when the stripe card info is loaded.

      Specified by:
        `onCardSummaryLoaded` in interface `ConversationDelegate`
      Parameters:
        `cardSummary` - The stripe card information.
      See Also:
        `ConversationDelegate.onCardSummaryLoaded(CardSummary)`

    - #### onAvMessagingSdkConnectionStatusChanged

          public void onAvMessagingSdkConnectionStatusChanged​(AvMessagingSdkConnectionStatus status)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate when the user's connection to AvMessagingSdk has changed.

      Called when the user's connection to AvMessagingSdk changes.

      Specified by:
        `onAvMessagingSdkConnectionStatusChanged` in interface `ConversationDelegate`
      Parameters:
        `status` - The connection status.
      See Also:
        `ConversationDelegate.onAvMessagingSdkConnectionStatusChanged(AvMessagingSdkConnectionStatus)`

    - #### onAvMessagingSdkShown

          public void onAvMessagingSdkShown()

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate when the AvMessagingSdk Conversation is shown.
      Specified by:
        `onAvMessagingSdkShown` in interface `ConversationDelegate`
      See Also:
        `ConversationDelegate.onAvMessagingSdkShown()`

    - #### onAvMessagingSdkHidden

          public void onAvMessagingSdkHidden()

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate when the AvMessagingSdk Conversation is hidden.
      Specified by:
        `onAvMessagingSdkHidden` in interface `ConversationDelegate`
      See Also:
        `ConversationDelegate.onAvMessagingSdkHidden()`

    - #### onConversationsListUpdated

          public void onConversationsListUpdated​(java.util.List<Conversation> conversationsList)

      Description copied from interface: `ConversationDelegate`
      Notifies the delegate when the conversations list was updated. If you are building your own conversation list UI, implement this method to receive updates on any conversations in the list for this user
      Specified by:
        `onConversationsListUpdated` in interface `ConversationDelegate`
      Parameters:
        `conversationsList` - an updated list of `Conversation`
      See Also:
        `ConversationDelegate.onConversationsListUpdated(List)`