public final class IMMsg
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
int |
cmdType |
long |
cmsgid |
long |
ctime |
long |
dbid |
byte[] |
extend1 |
byte[] |
extend2 |
byte[] |
extend3 |
byte[] |
extend4 |
byte[] |
extend5 |
byte[] |
extend6 |
java.lang.String |
fromID |
long |
hdelay |
java.lang.String |
hpath |
int |
httpResponseCode |
static int |
IM_CMDTYPE_GATEWAY |
static int |
IM_CMDTYPE_GROUP |
static int |
IM_CMDTYPE_PRIVATE |
static int |
IM_CMDTYPE_ROOM |
static int |
IM_CMDTYPE_SYSTEM |
static int |
IM_SUBTYPE_AUDIO |
static int |
IM_SUBTYPE_DEBUG |
static int |
IM_SUBTYPE_IMAGE |
static int |
IM_SUBTYPE_PULL_LOG |
static int |
IM_SUBTYPE_ROOMDIY |
static int |
IM_SUBTYPE_TEXT |
static int |
IM_SUBTYPE_VIDEO |
int |
isReaded |
byte[] |
msgContent |
int |
origin |
byte[] |
pushTitle |
long |
qdelay |
java.lang.String |
requestID |
java.lang.String |
responseContent |
long |
sdelay |
long |
sequence |
int |
serviceResponseCode |
long |
smsgid |
long |
stime |
int |
subType |
java.lang.String |
tempLocalPath |
java.lang.String |
toID |
构造器和说明 |
---|
IMMsg() |
限定符和类型 | 方法和说明 |
---|---|
static IMMsg |
buildAudioPrivateMessage(java.lang.String targetId,
java.lang.String msgType,
java.lang.String content,
java.lang.String pushTitle,
java.lang.String pushContent,
java.lang.String extend3,
byte[] extend4,
java.lang.String targetAppID,
java.lang.String targetAppUID)
构建音频私信消息
|
static IMMsg |
buildChatRoomMessage(java.lang.String targetId,
java.lang.String msgType,
java.lang.String content)
构建房间消息
|
static IMMsg |
buildGroupMessage(int sub,
java.lang.String tid,
java.lang.String type,
java.lang.String content,
java.lang.String pushTitle,
java.lang.String pushContent,
java.lang.String extend3,
byte[] extend4) |
static IMMsg |
buildImagePrivateMessage(java.lang.String targetId,
java.lang.String msgType,
java.lang.String content,
java.lang.String pushTitle,
java.lang.String pushContent,
java.lang.String extend3,
byte[] extend4,
java.lang.String targetAppID,
java.lang.String targetAppUID)
构建图片私信消息
|
static IMMsg |
buildPrivateMessage(int sub,
java.lang.String tid,
java.lang.String type,
java.lang.String content,
java.lang.String pushTitle,
java.lang.String pushContent,
java.lang.String extend3,
byte[] extend4,
java.lang.String targetAppID,
java.lang.String targetAppUID)
构建私信消息
|
static IMMsg |
buildTextPrivateMessage(java.lang.String targetId,
java.lang.String msgType,
java.lang.String content,
java.lang.String pushTitle,
java.lang.String pushContent,
java.lang.String extend3,
byte[] extend4,
java.lang.String targetAppID,
java.lang.String targetAppUID)
构建文本私信消息 如果是发送文本消息请使用这个方法构建消息对象,使用正确的方法构建对象发送消息可加速消息的处理。
|
static IMMsg |
buildVideoPrivateMessage(java.lang.String targetId,
java.lang.String msgType,
java.lang.String content,
java.lang.String pushTitle,
java.lang.String pushContent,
java.lang.String extend3,
byte[] extend4,
java.lang.String targetAppID,
java.lang.String targetAppUID)
构建视频私信消息
|
static IMMsg |
fromJsonObject(org.json.JSONObject object) |
java.lang.String |
getMsgContent() |
java.lang.String |
getMsgType() |
boolean |
invalid() |
boolean |
isAudioContent() |
boolean |
isChatroomMessage() |
boolean |
isGatewayMessage() |
boolean |
isGroupMessage() |
boolean |
isImageContent() |
boolean |
isPrivateMessage() |
boolean |
isSystemMessage() |
boolean |
isTextContent() |
boolean |
isValidChatroomMessage() |
boolean |
isValidGroupMessage() |
boolean |
isValidPrivateMessage() |
boolean |
isVideoContent() |
void |
setExtend3(java.lang.String data) |
void |
setMsgContent(java.lang.String content) |
void |
setMsgType(java.lang.String type) |
void |
setPushContent(java.lang.String content) |
void |
setPushTitle(java.lang.String title) |
public static final int IM_CMDTYPE_ROOM
public static final int IM_CMDTYPE_PRIVATE
public static final int IM_CMDTYPE_GROUP
public static final int IM_CMDTYPE_SYSTEM
public static final int IM_CMDTYPE_GATEWAY
public static final int IM_SUBTYPE_TEXT
public static final int IM_SUBTYPE_IMAGE
public static final int IM_SUBTYPE_AUDIO
public static final int IM_SUBTYPE_VIDEO
public static final int IM_SUBTYPE_ROOMDIY
public static final int IM_SUBTYPE_PULL_LOG
public static final int IM_SUBTYPE_DEBUG
public int origin
public long dbid
public int isReaded
public int cmdType
public int subType
public java.lang.String fromID
public java.lang.String toID
public byte[] msgContent
public byte[] extend1
public byte[] extend2
public byte[] extend3
public byte[] extend4
public byte[] extend5
public byte[] extend6
public long cmsgid
public long smsgid
public long sequence
public long ctime
public long stime
public java.lang.String requestID
public byte[] pushTitle
public java.lang.String tempLocalPath
public int httpResponseCode
public int serviceResponseCode
public java.lang.String responseContent
public java.lang.String hpath
public long hdelay
public long sdelay
public long qdelay
public boolean invalid()
public java.lang.String getMsgType()
public boolean isChatroomMessage()
public boolean isValidChatroomMessage()
public boolean isPrivateMessage()
public boolean isValidPrivateMessage()
public boolean isGroupMessage()
public boolean isValidGroupMessage()
public boolean isSystemMessage()
public boolean isGatewayMessage()
public boolean isTextContent()
public boolean isImageContent()
public boolean isAudioContent()
public boolean isVideoContent()
public void setMsgType(java.lang.String type)
type
- public void setMsgContent(java.lang.String content)
content
- public java.lang.String getMsgContent()
public void setExtend3(java.lang.String data)
data
- public void setPushTitle(java.lang.String title)
title
- 推送标题public void setPushContent(java.lang.String content)
content
- 推送内容public static IMMsg buildChatRoomMessage(java.lang.String targetId, java.lang.String msgType, java.lang.String content)
targetId
- 房间IDmsgType
- 消息的自定义扩展类型,可作为消息标识,但不能传空或者空串。content
- 消息内容public static IMMsg buildTextPrivateMessage(java.lang.String targetId, java.lang.String msgType, java.lang.String content, java.lang.String pushTitle, java.lang.String pushContent, java.lang.String extend3, byte[] extend4, java.lang.String targetAppID, java.lang.String targetAppUID)
targetId
- 接收者IDmsgType
- 消息的自定义扩展类型,可作为消息标识,但不能传空或者空串。content
- 消息内容pushTitle
- 推送标题(如果用户离线,消息会以推送通知的形式发送)pushContent
- 推送的内容extend3
- 扩展,暂未使用extend4
- 私信,群组的语音数据targetAppID
- 跨应用发消息时应用appIdtargetAppUID
- 跨应用发消息的用户IDpublic static IMMsg buildImagePrivateMessage(java.lang.String targetId, java.lang.String msgType, java.lang.String content, java.lang.String pushTitle, java.lang.String pushContent, java.lang.String extend3, byte[] extend4, java.lang.String targetAppID, java.lang.String targetAppUID)
targetId
- 接收者IDmsgType
- 消息的自定义扩展类型,可作为消息标识,但不能传空或者空串。content
- 消息内容pushTitle
- 推送标题(如果用户离线,消息会以推送通知的形式发送)pushContent
- 推送的内容extend3
- 扩展,暂未使用extend4
- 私信,群组的语音数据targetAppID
- 跨应用发消息时应用appIdtargetAppUID
- 跨应用发消息的用户IDpublic static IMMsg buildAudioPrivateMessage(java.lang.String targetId, java.lang.String msgType, java.lang.String content, java.lang.String pushTitle, java.lang.String pushContent, java.lang.String extend3, byte[] extend4, java.lang.String targetAppID, java.lang.String targetAppUID)
targetId
- 接收者IDmsgType
- 消息的自定义扩展类型,可作为消息标识,但不能传空或者空串。content
- 消息内容pushTitle
- 推送标题(如果用户离线,消息会以推送通知的形式发送)pushContent
- 推送的内容extend3
- 扩展,暂未使用extend4
- 私信,群组的语音数据targetAppID
- 跨应用发消息时应用appIdtargetAppUID
- 跨应用发消息的用户IDpublic static IMMsg buildVideoPrivateMessage(java.lang.String targetId, java.lang.String msgType, java.lang.String content, java.lang.String pushTitle, java.lang.String pushContent, java.lang.String extend3, byte[] extend4, java.lang.String targetAppID, java.lang.String targetAppUID)
targetId
- 接收者IDmsgType
- 消息的自定义扩展类型,可作为消息标识,但不能传空或者空串。content
- 消息内容pushTitle
- 推送标题(如果用户离线,消息会以推送通知的形式发送)pushContent
- 推送的内容extend3
- 扩展,暂未使用extend4
- 私信,群组的语音数据targetAppID
- 跨应用发消息时应用appIdtargetAppUID
- 跨应用发消息的用户IDpublic static IMMsg buildPrivateMessage(int sub, java.lang.String tid, java.lang.String type, java.lang.String content, java.lang.String pushTitle, java.lang.String pushContent, java.lang.String extend3, byte[] extend4, java.lang.String targetAppID, java.lang.String targetAppUID)
sub
- 媒体类型tid
- 接收者IDtype
- 消息的自定义扩展类型,可作为消息标识,但不能传空或者空串。content
- 消息内容pushTitle
- 推送标题(如果用户离线,消息会以推送通知的形式发送)pushContent
- 推送的内容extend3
- 扩展,暂未使用extend4
- 私信,群组的语音数据targetAppID
- 跨应用发消息时应用appIdtargetAppUID
- 跨应用发消息的用户IDpublic static IMMsg buildGroupMessage(int sub, java.lang.String tid, java.lang.String type, java.lang.String content, java.lang.String pushTitle, java.lang.String pushContent, java.lang.String extend3, byte[] extend4)
sub
- 媒体类型tid
- 接收者IDtype
- 消息类型content
- 消息内容public static IMMsg fromJsonObject(org.json.JSONObject object)
object
- json对象