Class ContactNotificationMessage

  • All Implemented Interfaces:

    
    public class ContactNotificationMessage
    
                        

    好友请求消息类

    好友请求消息类,此消息会进行存储,但不计入未读消息数。

    • 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() 获取操作名,对应 ContactOperationXxxx,或自己传任何字符串。
      void setOperation(String operation) 设置操作名,对应 ContactOperationXxxx,或自己传任何字符串。
      String getSourceUserId() 获取当前操作发起用户的用户 id。
      void setSourceUserId(String sourceUserId) 设置当前操作发起用户的用户 id。
      String getTargetUserId() 获取当前操作目标用户的用户 id。
      void setTargetUserId(String targetUserId) 设置当前操作目标用户的用户 id。
      String getMessage() 获取请求或者响应消息,如添加理由或拒绝理由。
      void setMessage(String message) 设置请求或者响应消息,如添加理由或拒绝理由。
      static ContactNotificationMessage obtain(String operation, String sourceUserId, String targetUserId, String message) 创建消息实例。
      Array<byte> encode()
      void writeToParcel(Parcel dest, int flags) 将类的数据写入外部提供的 Parcel 中。
      int describeContents() 描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。
      • 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()

        获取操作名,对应 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 对象特殊对象类型集合的排列。