public class LCIMMessageManager extends Object
Constructor and Description |
---|
LCIMMessageManager() |
Modifier and Type | Method and Description |
---|---|
protected static LCIMConversationEventHandler |
getConversationEventHandler() |
protected static LCIMMessage |
parseTypedMessage(LCIMMessage message)
解析 LCIMMessage 对象的子类
|
protected static void |
processMessage(LCIMMessage message,
int convType,
LCIMClient client,
boolean hasMore,
boolean isTransient) |
protected static void |
processMessageReceipt(LCIMMessage message,
LCIMClient client,
String from) |
static void |
registerDefaultMessageHandler(LCIMMessageHandler handler)
注册一般情况下的消息handler,只有在没有类型的 LCIMMessage 或者没有其他 handler 时才会被调用
请在 Application 初始化时设置
|
static void |
registerLCIMMessageType(Class<? extends LCIMTypedMessage> messageType)
注册自定义的消息类型
|
static void |
registerMessageHandler(Class<? extends LCIMMessage> clazz,
MessageHandler<?> handler)
注册特定消息格式的处理单元
|
static void |
setConversationEventHandler(LCIMConversationEventHandler handler)
设置Conversataion相关事件的处理单元,
推荐在Application初始化时设置
|
static void |
unregisterMessageHandler(Class<? extends LCIMMessage> clazz,
MessageHandler<?> handler)
取消特定消息格式的处理单元
|
protected static final LCLogger LOGGER
public static void registerLCIMMessageType(Class<? extends LCIMTypedMessage> messageType)
messageType
- message type.public static void registerDefaultMessageHandler(LCIMMessageHandler handler)
handler
- message handler.public static void registerMessageHandler(Class<? extends LCIMMessage> clazz, MessageHandler<?> handler)
clazz
- 特定的消息类handler
- message handler.public static void unregisterMessageHandler(Class<? extends LCIMMessage> clazz, MessageHandler<?> handler)
clazz
- message class.handler
- message handler.public static void setConversationEventHandler(LCIMConversationEventHandler handler)
handler
- message handler.protected static LCIMConversationEventHandler getConversationEventHandler()
protected static void processMessage(LCIMMessage message, int convType, LCIMClient client, boolean hasMore, boolean isTransient)
protected static void processMessageReceipt(LCIMMessage message, LCIMClient client, String from)
protected static LCIMMessage parseTypedMessage(LCIMMessage message)
message
- messageCopyright © 2020, 美味书签(北京)信息技术有限公司 All rights reserved.