Package io.rong.message
Class ContactNotificationMessage
-
- All Implemented Interfaces:
public class ContactNotificationMessage好友请求消息类
好友请求消息类,此消息会进行存储,但不计入未读消息数。
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringCONTACT_OPERATION_REQUESTpublic final static StringCONTACT_OPERATION_ACCEPT_RESPONSEpublic final static StringCONTACT_OPERATION_REJECT_RESPONSEpublic Stringoperationpublic StringsourceUserIdpublic StringtargetUserIdpublic Stringmessagepublic final static Creator<ContactNotificationMessage>CREATOR
-
Constructor Summary
Constructors Constructor Description ContactNotificationMessage(Array<byte> data)ContactNotificationMessage(Parcel in)
-
Method Summary
Modifier and Type Method Description StringgetOperation()获取操作名,对应 ContactOperationXxxx,或自己传任何字符串。 voidsetOperation(String operation)设置操作名,对应 ContactOperationXxxx,或自己传任何字符串。 StringgetSourceUserId()获取当前操作发起用户的用户 id。 voidsetSourceUserId(String sourceUserId)设置当前操作发起用户的用户 id。 StringgetTargetUserId()获取当前操作目标用户的用户 id。 voidsetTargetUserId(String targetUserId)设置当前操作目标用户的用户 id。 StringgetMessage()获取请求或者响应消息,如添加理由或拒绝理由。 voidsetMessage(String message)设置请求或者响应消息,如添加理由或拒绝理由。 static ContactNotificationMessageobtain(String operation, String sourceUserId, String targetUserId, String message)创建消息实例。 Array<byte>encode()voidwriteToParcel(Parcel dest, int flags)将类的数据写入外部提供的 Parcel 中。 intdescribeContents()描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。 -
-
Constructor Detail
-
ContactNotificationMessage
ContactNotificationMessage(Array<byte> data)
-
ContactNotificationMessage
ContactNotificationMessage(Parcel in)
-
-
Method Detail
-
getOperation
String getOperation()
获取操作名,对应 ContactOperationXxxx,或自己传任何字符串。
- Returns:
操作名,对应 ContactOperationXxxx,或自己传任何字符串。
-
setOperation
void setOperation(String operation)
设置操作名,对应 ContactOperationXxxx,或自己传任何字符串。
- Parameters:
operation- 操作名,对应 ContactOperationXxxx,或自己传任何字符串。
-
getSourceUserId
String getSourceUserId()
获取当前操作发起用户的用户 id。
- Returns:
当前操作发起用户的用户 id。
-
setSourceUserId
void setSourceUserId(String sourceUserId)
设置当前操作发起用户的用户 id。
- Parameters:
sourceUserId- 当前操作发起用户的用户 id。
-
getTargetUserId
String getTargetUserId()
获取当前操作目标用户的用户 id。
- Returns:
当前操作目标用户的用户 id。
-
setTargetUserId
void setTargetUserId(String targetUserId)
设置当前操作目标用户的用户 id。
- Parameters:
targetUserId- 当前操作目标用户的用户 id。
-
getMessage
String getMessage()
获取请求或者响应消息,如添加理由或拒绝理由。
- Returns:
请求或者响应消息,如添加理由或拒绝理由。
-
setMessage
void setMessage(String message)
设置请求或者响应消息,如添加理由或拒绝理由。
- Parameters:
message- 请求或者响应消息,如添加理由或拒绝理由。
-
obtain
static ContactNotificationMessage obtain(String operation, String sourceUserId, String targetUserId, String message)
创建消息实例。
- Parameters:
operation- 操作名,对应 ContactOperationXxxx,或自己传任何字符串。sourceUserId- 请求者或者响应者的 UserId。targetUserId- 被请求者或者被响应者的 UserId。message- 请求或者响应消息,如添加理由或拒绝理由。- Returns:
消息实例。
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
将类的数据写入外部提供的 Parcel 中。
- Parameters:
dest- 对象被写入的 Parcel。flags- 对象如何被写入的附加标志,可能是 0 或 PARCELABLE_WRITE_RETURN_VALUE。
-
describeContents
int describeContents()
描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。
- Returns:
一个标志位,表明 Parcelable 对象特殊对象类型集合的排列。
-
-
-
-