BMXMessage
class im.floo.floolib.BMXMessage
消息
- getCPtr
- finalize
- delete
- msgId
- clientMsgId
- fromId
- toId
- type
- conversationId
- deliveryStatus
- setDeliveryStatus
- serverTimestamp
- setServerTimestamp
- clientTimestamp
- setClientTimestamp
- isPlayed
- setIsPlayed
- isPlayAcked
- setIsPlayAcked
- isReceiveMsg
- setIsReceiveMsg
- isRead
- setIsRead
- isReadAcked
- setIsReadAcked
- isDeliveryAcked
- setIsDeliveryAcked
- content
- setContent
- contentType
- attachment
- config
- setConfig
- extension
- setExtension
- deliveryQos
- setDeliveryQos
- senderName
- setSenderName
- groupAckCount
- groupAckUnreadCount
- groupAckReadAll
- groupPlayAckCount
- setGroupPlayAckCount
- groupPlayAckUnreadCount
- setGroupPlayAckUnreadCount
- groupPlayAckReadAll
- setPriority
- priority
- setPushMessageMode
- isPushMessage
- createMessage
- createMessage
- createCommandMessage
- createMessage
- createMessage
- createCommandMessage
- createForwardMessage
- protected static long getCPtr(BMXMessage obj);
-
Returns long
- protected void finalize();
-
Returns void
- public synchronized void delete();
-
Returns void
- public long msgId();
-
消息唯一ID
Returns long
- public long clientMsgId();
-
消息客户端ID,仅在消息发送端存在
Returns long
- public long fromId();
-
消息发送方ID
Returns long
- public long toId();
-
消息接收方ID
Returns long
- public BMXMessage.MessageType type();
-
消息类型
Returns MessageType
- public long conversationId();
-
消息所属会话ID
Returns long
- public BMXMessage.DeliveryStatus deliveryStatus();
-
消息投递状态
Returns DeliveryStatus
- public void setDeliveryStatus(BMXMessage.DeliveryStatus arg0);
-
设置消息投递状态
Returns void
- public long serverTimestamp();
-
消息时间戳(服务端收到时的时间)
Returns long
- public void setServerTimestamp(long arg0);
-
设置时间戳(服务端收到时的时间)
Returns void
- public long clientTimestamp();
-
本地时间戳(消息创建或者收到时的本地时间)
Returns long
- public void setClientTimestamp(long arg0);
-
设置消息本地时间戳
Returns void
- public boolean isPlayed();
-
语音或者视频消息是否播放过,仅对收到的音视频消息有效
Returns boolean
- public void setIsPlayed(boolean arg0);
-
Returns void
- public boolean isPlayAcked();
-
语音或者视频消息是否收到播放回执,仅对收到的音视频消息有效
Returns boolean
- public void setIsPlayAcked(boolean arg0);
-
Returns void
- public boolean isReceiveMsg();
-
是否接收的消息
Returns boolean
- public void setIsReceiveMsg(boolean arg0);
-
Returns void
- public boolean isRead();
-
消息是否已读标志
Returns boolean
- public void setIsRead(boolean arg0);
-
Returns void
- public boolean isReadAcked();
-
对于发送方表示是否收到了已读回执,对于接收方表示是否发送了已读回执
Returns boolean
- public void setIsReadAcked(boolean arg0);
-
Returns void
- public boolean isDeliveryAcked();
-
对于发送方表示消息是否已投递到对方,对于接收方表示是否发送了消息已到达回执
Returns boolean
- public void setIsDeliveryAcked(boolean arg0);
-
Returns void
- public String content();
-
消息文本内容
Returns String
- public void setContent(String content);
-
消息文本内容
Parameters-
content: String
消息文本内容
Returns void -
- public BMXMessage.ContentType contentType();
-
消息内容类型,如果带附件就表示附件类型,不带附件就是文本类型
Returns ContentType
- public BMXMessageAttachment attachment();
-
消息附件,BMXMessage拥有附件的所有权,负责释放
Returns BMXMessageAttachment
- public BMXMessageConfig config();
-
消息的配置信息
Returns BMXMessageConfig
- public void setConfig(BMXMessageConfig arg0);
-
设置消息配置信息
Returns void
- public String extension();
-
消息扩展信息
Returns String
- public void setExtension(String arg0);
-
设置消息扩展信息
Returns void
- public BMXMessage.DeliveryQos deliveryQos();
-
消息投递QOS
Returns DeliveryQos
- public void setDeliveryQos(BMXMessage.DeliveryQos qos);
-
设置消息投递QOS
Parameters-
qos: DeliveryQos
消息投递QOS
Returns void -
- public String senderName();
-
消息发送者的显示名称
Returns String
- public void setSenderName(String senderName);
-
设置消息的发送者显示名称
Parameters-
senderName: String
消息文本内容
Returns void -
- public int groupAckCount();
-
群消息已读AckCount数目
Returns int
- public int groupAckUnreadCount();
-
群消息未读AckCount数目
Returns int
- public boolean groupAckReadAll();
-
群消息是否全部已读
Returns boolean
- public int groupPlayAckCount();
-
获取群消息已播放计数
Returns int
- public void setGroupPlayAckCount(int count);
-
Returns void
- public int groupPlayAckUnreadCount();
-
获取群消息已播放回执未读计数
Returns int
- public void setGroupPlayAckUnreadCount(int count);
-
Returns void
- public boolean groupPlayAckReadAll();
-
设置所有群消息已播回执为已读
Returns boolean
- public void setPriority(int priority);
-
设置消息的扩散优先级,默认为0。0表示扩散,数字越小扩散的越多。 取值范围0-10。普通人在聊天室发送的消息级别默认为5,可以丢弃。管理员默认为0不会丢弃。其它值可以根据业务自行设置。
Parameters-
priority: int
优先级
Returns void -
- public int priority();
-
消息的扩散优先级
Returns int
- public void setPushMessageMode(boolean arg0);
-
设置是否推送消息
Returns void
- public boolean isPushMessage();
-
是否是推送消息
Returns boolean
- public static BMXMessage createMessage(long from, long to, BMXMessage.MessageType type, long conversationId, String content);
-
创建发送文本消息
Parameters-
from: long
消息发送者
-
to: long
消息接收者
-
type: MessageType
消息类型
-
conversationId: long
会话id
-
content: String
消息内容
Returns BMXMessage -
- public static BMXMessage createMessage(long from, long to, BMXMessage.MessageType type, long conversationId, BMXMessageAttachment attachment);
-
创建发送附件消息
Parameters-
from: long
消息发送者
-
to: long
消息接收者
-
type: MessageType
消息类型
-
conversationId: long
会话id
-
attachment: BMXMessageAttachment
附件
Returns BMXMessage -
- public static BMXMessage createCommandMessage(long from, long to, BMXMessage.MessageType type, long conversationId, String content);
-
创建发送命令消息(命令消息通过content字段或者extension字段存放命令信息)
Parameters-
from: long
消息发送者
-
to: long
消息接收者
-
type: MessageType
消息类型
-
conversationId: long
会话id
-
content: String
消息内容
Returns BMXMessage -
- public static BMXMessage createMessage(long msgId, long from, long to, BMXMessage.MessageType type, long conversationId, String content, long serverTimestamp);
-
创建收到的消息
Parameters-
msgId: long
消息id
-
from: long
消息发送者
-
to: long
消息接收者
-
type: MessageType
消息类型
-
conversationId: long
会话id
-
content: String
消息内容
-
serverTimestamp: long
服务器时间戳
Returns BMXMessage -
- public static BMXMessage createMessage(long msgId, long from, long to, BMXMessage.MessageType type, long conversationId, BMXMessageAttachment attachment, long serverTimestamp);
-
创建收到的消息
Parameters-
msgId: long
消息id
-
from: long
消息发送者
-
to: long
消息接收者
-
type: MessageType
消息类型
-
conversationId: long
会话id
-
attachment: BMXMessageAttachment
附件
-
serverTimestamp: long
服务器时间戳
Returns BMXMessage -
- public static BMXMessage createCommandMessage(long msgId, long from, long to, BMXMessage.MessageType type, long conversationId, String content, long serverTimestamp);
-
创建收到的命令消息(命令消息通过content字段或者extension字段存放命令信息)
Parameters-
msgId: long
消息id
-
from: long
消息发送者
-
to: long
消息接收者
-
type: MessageType
消息类型
-
conversationId: long
会话id
-
content: String
消息内容
-
serverTimestamp: long
服务器时间戳
Returns BMXMessage -
- public static BMXMessage createForwardMessage(BMXMessage msg, long from, long to, BMXMessage.MessageType type, long conversationId);
-
创建转发消息
Parameters-
msg: BMXMessage
要转发的消息
-
from: long
消息发送者
-
to: long
消息接收者
-
type: MessageType
消息类型
-
conversationId: long
会话id
Returns BMXMessage -