Class ContactNotificationMessage

  • All Implemented Interfaces:

    
    public class ContactNotificationMessage
    
                        

    Friend Request Message Class

    This class represents a friend request message. The message will be stored but will not be counted as an unread message.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getOperation() Retrieves the operation name, which corresponds to ContactOperationXxxx, or any custom string passed by the user.
      void setOperation(String operation) Sets the operation name, which corresponds to ContactOperationXxxx, or you can pass any string.
      String getSourceUserId() Gets the user ID of the user who initiated the current operation.
      void setSourceUserId(String sourceUserId) Sets the user ID of the user initiating the current operation.
      String getTargetUserId() Retrieves the user ID of the target user for the current operation.
      void setTargetUserId(String targetUserId) Sets the user ID of the target user for the current operation.
      String getMessage() Retrieves the request or response message, such as the reason for adding or rejecting.
      void setMessage(String message) Sets the request or response message, such as the reason for adding or rejecting.
      static ContactNotificationMessage obtain(String operation, String sourceUserId, String targetUserId, String message) Creates a message instance.
      Array<byte> encode()
      void writeToParcel(Parcel dest, int flags) Writes the class data into the provided Parcel.
      int describeContents() Describes the type of special objects included in the Parcelable object arrangement information.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.