Class ContactNotificationMessage
-
- All Implemented Interfaces:
public class ContactNotificationMessageFriend Request Message Class
This class represents a friend request message. The message will be stored but will not be counted as an unread message.
-
-
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()Retrieves the operation name, which corresponds to ContactOperationXxxx, or any custom string passed by the user. voidsetOperation(String operation)Sets the operation name, which corresponds to ContactOperationXxxx, or you can pass any string. StringgetSourceUserId()Gets the user ID of the user who initiated the current operation. voidsetSourceUserId(String sourceUserId)Sets the user ID of the user initiating the current operation. StringgetTargetUserId()Retrieves the user ID of the target user for the current operation. voidsetTargetUserId(String targetUserId)Sets the user ID of the target user for the current operation. StringgetMessage()Retrieves the request or response message, such as the reason for adding or rejecting. voidsetMessage(String message)Sets the request or response message, such as the reason for adding or rejecting. static ContactNotificationMessageobtain(String operation, String sourceUserId, String targetUserId, String message)Creates a message instance. Array<byte>encode()voidwriteToParcel(Parcel dest, int flags)Writes the class data into the provided Parcel. intdescribeContents()Describes the type of special objects included in the Parcelable object arrangement information. -
-
Constructor Detail
-
ContactNotificationMessage
ContactNotificationMessage(Array<byte> data)
-
ContactNotificationMessage
ContactNotificationMessage(Parcel in)
-
-
Method Detail
-
getOperation
String getOperation()
Retrieves the operation name, which corresponds to ContactOperationXxxx, or any custom string passed by the user.
- Returns:
The operation name, which corresponds to ContactOperationXxxx, or any custom string passed by the user.
-
setOperation
void setOperation(String operation)
Sets the operation name, which corresponds to ContactOperationXxxx, or you can pass any string.
- Parameters:
operation- The operation name, which corresponds to ContactOperationXxxx, or you can pass any string.
-
getSourceUserId
String getSourceUserId()
Gets the user ID of the user who initiated the current operation.
- Returns:
The user ID of the user who initiated the current operation.
-
setSourceUserId
void setSourceUserId(String sourceUserId)
Sets the user ID of the user initiating the current operation.
- Parameters:
sourceUserId- The user ID of the user initiating the current operation.
-
getTargetUserId
String getTargetUserId()
Retrieves the user ID of the target user for the current operation.
- Returns:
The user ID of the target user for the current operation.
-
setTargetUserId
void setTargetUserId(String targetUserId)
Sets the user ID of the target user for the current operation.
- Parameters:
targetUserId- The user ID of the target user for the current operation.
-
getMessage
String getMessage()
Retrieves the request or response message, such as the reason for adding or rejecting.
- Returns:
The request or response message, such as the reason for adding or rejecting.
-
setMessage
void setMessage(String message)
Sets the request or response message, such as the reason for adding or rejecting.
- Parameters:
message- The request or response message, such as the reason for adding or rejecting.
-
obtain
static ContactNotificationMessage obtain(String operation, String sourceUserId, String targetUserId, String message)
Creates a message instance.
- Parameters:
operation- The operation name, corresponding to ContactOperationXxxx, or any custom string.sourceUserId- The UserId of the requester or responder.targetUserId- The UserId of the requestee or responsee.message- The request or response message, such as the reason for adding or rejecting.- Returns:
The message instance.
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
Writes the class data into the provided Parcel.
- Parameters:
dest- The Parcel where the object is written.flags- Additional flags indicating how the object is written, which may be 0 or PARCELABLE_WRITE_RETURN_VALUE.
-
describeContents
int describeContents()
Describes the type of special objects included in the Parcelable object arrangement information.
- Returns:
A flag indicating the arrangement of the Parcelable object's special object type collection.
-
-
-
-