Package io.rong.imkit.conversation.messgelist.processor

## Class BaseBusinessProcessor

- All Implemented Interfaces:

      public abstract class BaseBusinessProcessor

  处理单聊、群聊、讨论组逻辑的公共类

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

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

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `init(MessageViewModel messageViewModel, Bundle bundle)` |
    `boolean` | `onReceived(MessageViewModel viewModel, UiMessage message, int left, boolean hasPackage, boolean offline)` |
    `boolean` | `onReceivedCmd(MessageViewModel messageViewModel, Message message)` |
    `void` | `onMessageItemClick(UiMessage uiMessage)` |
    `boolean` | `onMessageItemLongClick(UiMessage uiMessage)` |
    `void` | `onUserPortraitClick(Context context, ConversationType conversationType, UserInfo userInfo, String targetId)` |
    `boolean` | `onUserPortraitLongClick(Context context, ConversationType conversationType, UserInfo userInfo, String targetId)` |
    `boolean` | `onBackPressed(MessageViewModel viewModel)` |
    `void` | `onDestroy(MessageViewModel viewModel)` |
    `void` | `onExistUnreadMessage(MessageViewModel viewModel, Conversation conversation, int unreadMessageCount)` |
    `void` | `onMessageReceiptRequest(MessageViewModel viewModel, ConversationType conversationType, String targetId, String messageUId)` |
    `void` | `onLoadMessage(MessageViewModel viewModel, List<Message> messages)` |
    `void` | `onConnectStatusChange(MessageViewModel viewModel, ConnectionStatus status)` | 检查已读状态，如果 sp 有内容，则发送
    `void` | `onResume(MessageViewModel viewModel)` |
    `int` | `getHistoryMessageCount()` |
    `void` | `onLoadMore(MessageViewModel viewModel)` |
    `void` | `onClearMessage(MessageViewModel viewModel)` |
    `void` | `onRefresh(MessageViewModel viewModel)` |
    `void` | `newMessageBarClick(MessageViewModel viewModel)` |
    `void` | `unreadBarClick(MessageViewModel viewModel)` |
    `void` | `newMentionMessageBarClick(MessageViewModel viewModel)` |
    `boolean` | `isNormalState(MessageViewModel viewModel)` |
    `boolean` | `isHistoryState(MessageViewModel viewModel)` |
    `void` | `onScrollToBottom(MessageViewModel viewModel)` |

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

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

- - ### Constructor Detail

    - #### BaseBusinessProcessor

          BaseBusinessProcessor()

  - ### Method Detail

    - #### init

           void init(MessageViewModel messageViewModel, Bundle bundle)

    - #### onReceived

           boolean onReceived(MessageViewModel viewModel, UiMessage message, int left, boolean hasPackage, boolean offline)

    - #### onReceivedCmd

           boolean onReceivedCmd(MessageViewModel messageViewModel, Message message)

    - #### onMessageItemClick

           void onMessageItemClick(UiMessage uiMessage)

    - #### onMessageItemLongClick

           boolean onMessageItemLongClick(UiMessage uiMessage)

    - #### onUserPortraitClick

           void onUserPortraitClick(Context context, ConversationType conversationType, UserInfo userInfo, String targetId)

    - #### onUserPortraitLongClick

           boolean onUserPortraitLongClick(Context context, ConversationType conversationType, UserInfo userInfo, String targetId)

    - #### onBackPressed

           boolean onBackPressed(MessageViewModel viewModel)

    - #### onDestroy

           void onDestroy(MessageViewModel viewModel)

    - #### onExistUnreadMessage

           void onExistUnreadMessage(MessageViewModel viewModel, Conversation conversation, int unreadMessageCount)

    - #### onMessageReceiptRequest

           void onMessageReceiptRequest(MessageViewModel viewModel, ConversationType conversationType, String targetId, String messageUId)

    - #### onLoadMessage

           void onLoadMessage(MessageViewModel viewModel, List<Message> messages)

    - #### onConnectStatusChange

           void onConnectStatusChange(MessageViewModel viewModel, ConnectionStatus status)

      检查已读状态，如果 sp 有内容，则发送

    - #### onResume

           void onResume(MessageViewModel viewModel)

    - #### getHistoryMessageCount

           int getHistoryMessageCount()

      Returns:

        初始化时，拉取的历史条数，目前只有聊天室需要复写

    - #### onLoadMore

           void onLoadMore(MessageViewModel viewModel)

    - #### onClearMessage

           void onClearMessage(MessageViewModel viewModel)

    - #### onRefresh

           void onRefresh(MessageViewModel viewModel)

    - #### newMessageBarClick

           void newMessageBarClick(MessageViewModel viewModel)

    - #### unreadBarClick

           void unreadBarClick(MessageViewModel viewModel)

    - #### newMentionMessageBarClick

           void newMentionMessageBarClick(MessageViewModel viewModel)

    - #### isNormalState

           boolean isNormalState(MessageViewModel viewModel)

    - #### isHistoryState

           boolean isHistoryState(MessageViewModel viewModel)

    - #### onScrollToBottom

           void onScrollToBottom(MessageViewModel viewModel)