NIMSDK-AOS  10.8.10
RevokeMsgNotification.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.msg.model;
2 
4 import java.io.Serializable;
5 
6 /**
7  * 消息撤回通知实体
8  * 收到消息撤回通知后,sdk 会通知观察者,携带此对象
9  */
10 
11 public class RevokeMsgNotification implements Serializable {
12 
13  /**
14  * 被撤回的消息
15  */
16  private IMMessage message;
17 
18  /**
19  * 附件信息
20  */
21  private String attach;
22 
23 
24  /**
25  * 消息撤回者账号
26  */
27  private String revokeAccount;
28 
29 
30  /**
31  * 获取消息撤回时设置的msg 字段(eg: 通过服务端API撤回)。
32  */
33  private String customInfo;
34 
35 
36  /**
37  * 通知类型: 1表示是离线,2表示是漫游 , 默认 0
38  */
39  private int notificationType;
40 
41  /**
42  * 撤回类型, 点对点双向,单向,群双向,单向
43  */
44  private RevokeType revokeType;
45 
46  /**
47  * 扩展字段
48  */
49  private String callbackExt;
50  /**
51  * 消息撤回时间
52  */
53  private long time;
54 
55  public RevokeMsgNotification(IMMessage message, String attach, String revokeAccount, String customInfo, int notificationType,
56  RevokeType revokeType, String callbackExt,long time) {
57  this.message = message;
58  this.attach = attach;
59  this.revokeAccount = revokeAccount;
60  this.customInfo = customInfo;
61  this.notificationType = notificationType;
62  this.revokeType = revokeType;
63  this.callbackExt = callbackExt;
64  this.time = time;
65  }
66 
67  /**
68  * 获取撤回对应的消息
69  */
70  public IMMessage getMessage() {
71  return message;
72  }
73 
74  /**
75  * 附件信息
76  */
77  public String getAttach() {
78  return attach;
79  }
80 
81  /**
82  * 获取撤回消息的操作帐号
83  */
84  public String getRevokeAccount() {
85  return revokeAccount;
86  }
87 
88  /**
89  * 获取消息撤回时设置的msg 字段(eg: 通过服务端API撤回)。
90  */
91  public String getCustomInfo() {
92  return customInfo;
93  }
94 
95  /**
96  * 获取通知类型: 1表示是离线,2表示是漫游 , 默认 0
97  */
98  public int getNotificationType() {
99  return notificationType;
100  }
101 
102  /**
103  * 获取撤回类型:分为点对点双向撤回, 群双向撤回, 超大群双向撤回, 点对点单向撤回和未定义
104  */
106  return revokeType;
107  }
108 
109  public String getCallbackExt() {
110  return callbackExt;
111  }
112 
113  public long getTime() {
114  return time;
115  }
116 
117 }
RevokeMsgNotification(IMMessage message, String attach, String revokeAccount, String customInfo, int notificationType, RevokeType revokeType, String callbackExt, long time)
RevokeType getRevokeType()
获取撤回类型:分为点对点双向撤回, 群双向撤回, 超大群双向撤回, 点对点单向撤回和未定义 ...
NIM消息实体数据结构。 第三方APP不要调用设置类接口,调用之后不会被持久化
Definition: IMMessage.java:11
String getCustomInfo()
获取消息撤回时设置的msg 字段(eg: 通过服务端API撤回)。
int getNotificationType()
获取通知类型: 1表示是离线,2表示是漫游 , 默认 0
消息撤回通知实体 收到消息撤回通知后,sdk 会通知观察者,携带此对象
String getRevokeAccount()
获取撤回消息的操作帐号
Created by hzsunyj on 2019-12-05.
Definition: RevokeType.java:8