NIMSDK-AOS  10.5.0
AddFriendNotify.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.friend.model;
2 
3 import com.netease.nimlib.biz.constant.IFriendService;
4 
5 import java.io.Serializable;
6 
10 public class AddFriendNotify implements Serializable {
11 
15  public enum Event {
19  RECV_ADD_FRIEND_DIRECT(IFriendService.VerifyType.ADD),
20 
24  RECV_ADD_FRIEND_VERIFY_REQUEST(IFriendService.VerifyType.ASK),
25 
29  RECV_AGREE_ADD_FRIEND(IFriendService.VerifyType.AGREE),
30 
34  RECV_REJECT_ADD_FRIEND(IFriendService.VerifyType.REJECT);
35 
36  private byte value;
37 
38  Event(byte value) {
39  this.value = value;
40  }
41 
42  public static Event eventOfValue(byte type) {
43  for (Event e : values()) {
44  if (e.getValue() == type) {
45  return e;
46  }
47  }
48  return null;
49  }
50 
51  public byte getValue() {
52  return value;
53  }
54  }
55 
56  private String account;
57 
58  private Event event;
59 
60  private String msg;
61 
62  private String serverExt;
63 
64  public AddFriendNotify(String account, Event event) {
65  this.account = account;
66  this.event = event;
67  }
68 
69  public AddFriendNotify(String account, Event event, String msg) {
70  this.account = account;
71  this.event = event;
72  this.msg = msg;
73  }
74 
75  public AddFriendNotify(String account, Event event, String msg, String serverExt) {
76  this.account = account;
77  this.event = event;
78  this.msg = msg;
79  this.serverExt = serverExt;
80  }
81 
82  public String getAccount() {
83  return account;
84  }
85 
86  public Event getEvent() {
87  return event;
88  }
89 
90  public String getMsg() {
91  return msg;
92  }
93 
94  public String getServerExt() {
95  return serverExt;
96  }
97 }
AddFriendNotify(String account, Event event, String msg)
AddFriendNotify(String account, Event event, String msg, String serverExt)