NIMSDK-AOS  10.6.0
ChatRoomPartClearAttachment.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.chatroom.model;
2 
4 import com.netease.nimlib.util.JSONHelper;
5 
6 import org.json.JSONObject;
7 
8 import java.util.Map;
9 
15 
16  private static final String TAG_QUEUE_CHANGE = "queueChange";
17  private static final String TAG_KEYS = "kvObject";
18  private static final String TAG_TYPE = "_e";
19 
20  private Map<String, String> contentMap;
21 
24  }
25 
26  public Map<String, String> getContentMap() {
27  return contentMap;
28  }
29 
30  @Override
31  public void parse(JSONObject json) {
32  super.parse(json);
33  if (json.has(TAG_QUEUE_CHANGE)) {
34  String queueChange = JSONHelper.getString(json, TAG_QUEUE_CHANGE);
35  JSONObject jsonObject = JSONHelper.parse(queueChange);
36 
37  if (jsonObject != null && jsonObject.has(TAG_KEYS)) {
38  String content = JSONHelper.getString(jsonObject, TAG_KEYS);
39  JSONObject contentJson = JSONHelper.parse(content);
40  contentMap = JSONHelper.parseMapFromJsonObject(contentJson);
41  }
42  }
43  }
44 }
PARTCLEAR
PARTCLEAR: 部分清理操作(发生在提交元素的用户掉线时,清理这个用户对应的key)