public abstract class ConversationDelegateAdapter extends java.lang.Object implements ConversationDelegate
ConversationDelegate
so individual methods can be overridden.INTEGRATOR_DELEGATE
Constructor and Description |
---|
ConversationDelegateAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
onBrandMessengerConnectionStatusChanged(BrandMessengerConnectionStatus status)
Notifies the delegate when the user's connection to BrandMessenger has changed.
|
void |
onBrandMessengerHidden()
Notifies the delegate when the BrandMessenger Conversation is hidden.
|
void |
onBrandMessengerShown()
Notifies the delegate when the BrandMessenger 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
BrandMessenger.login(String, String, BrandMessengerCallback) is complete |
void |
onLogoutComplete(LogoutResult result)
Notifies the delegate when a call to
BrandMessenger.logout(BrandMessengerCallback) 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.
|
public void onMessagesReceived(Conversation conversation, java.util.List<Message> messages)
ConversationDelegate
Called when new messages are received from the server.
onMessagesReceived
in interface ConversationDelegate
conversation
- The conversation object.messages
- A list of Message objects representing the new messages.ConversationDelegate.onMessagesReceived(Conversation, List)
public void onMessagesReset(Conversation conversation, java.util.List<Message> messages)
ConversationDelegate
Called when new messages are received from the server that do not match locally stored cache or if a different conversation was loaded.
onMessagesReset
in interface ConversationDelegate
conversation
- The conversation object.messages
- A list of Message objects representing the new messages.ConversationDelegate.onMessagesReset(Conversation, List)
public void onUnreadCountChanged(Conversation conversation, int unreadCount)
ConversationDelegate
Called when conversation data is fetched from the server, or when the user enters the conversation activity.
onUnreadCountChanged
in interface ConversationDelegate
conversation
- The conversation objectunreadCount
- The count of unread messagesConversationDelegate.onUnreadCountChanged(Conversation, int)
public void onMessageSent(Message message, MessageUploadStatus status)
ConversationDelegate
Called once the message has been sent successfully or not.
onMessageSent
in interface ConversationDelegate
message
- The message that was sentstatus
- The status of the message that was sentConversationDelegate.onMessageSent(Message, MessageUploadStatus)
public void onConversationEventReceived(ConversationEvent conversationActivity)
ConversationDelegate
Called when a new activity is received from the server
onConversationEventReceived
in interface ConversationDelegate
conversationActivity
- The conversationActivity that was receivedConversationDelegate.onConversationEventReceived(ConversationEvent)
public void onInitializationStatusChanged(InitializationStatus status)
ConversationDelegate
onInitializationStatusChanged
in interface ConversationDelegate
status
- The new statusConversationDelegate.onInitializationStatusChanged(InitializationStatus)
public void onLoginComplete(LoginResult result)
ConversationDelegate
BrandMessenger.login(String, String, BrandMessengerCallback)
is completeonLoginComplete
in interface ConversationDelegate
result
- The login resultConversationDelegate.onLoginComplete(LoginResult)
public void onLogoutComplete(LogoutResult result)
ConversationDelegate
BrandMessenger.logout(BrandMessengerCallback)
is completeonLogoutComplete
in interface ConversationDelegate
result
- The logout resultConversationDelegate.onLogoutComplete(LogoutResult)
public void onPaymentProcessed(MessageAction messageAction, PaymentStatus status)
ConversationDelegate
onPaymentProcessed
in interface ConversationDelegate
messageAction
- The purchased message actionstatus
- The status of the paymentConversationDelegate.onPaymentProcessed(MessageAction, PaymentStatus)
public boolean shouldTriggerAction(MessageAction messageAction)
ConversationDelegate
Called when the user taps a message action.
shouldTriggerAction
in interface ConversationDelegate
messageAction
- The message action that was tapped.ConversationDelegate.shouldTriggerAction(MessageAction)
public void onCardSummaryLoaded(CardSummary cardSummary)
ConversationDelegate
Called when the stripe card info is loaded.
onCardSummaryLoaded
in interface ConversationDelegate
cardSummary
- The stripe card information.ConversationDelegate.onCardSummaryLoaded(CardSummary)
public void onBrandMessengerConnectionStatusChanged(BrandMessengerConnectionStatus status)
ConversationDelegate
Called when the user's connection to BrandMessenger changes.
onBrandMessengerConnectionStatusChanged
in interface ConversationDelegate
status
- The connection status.ConversationDelegate.onBrandMessengerConnectionStatusChanged(BrandMessengerConnectionStatus)
public void onBrandMessengerShown()
ConversationDelegate
onBrandMessengerShown
in interface ConversationDelegate
ConversationDelegate.onBrandMessengerShown()
public void onBrandMessengerHidden()
ConversationDelegate
onBrandMessengerHidden
in interface ConversationDelegate
ConversationDelegate.onBrandMessengerHidden()
public void onConversationsListUpdated(java.util.List<Conversation> conversationsList)
ConversationDelegate
onConversationsListUpdated
in interface ConversationDelegate
conversationsList
- an updated list of Conversation
ConversationDelegate.onConversationsListUpdated(List)