NIMSDK-AOS  9.19.0
SessionTypeEnum.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.msg.constant;
2 
3 import com.netease.nimlib.biz.constant.ITalkService;
4 
5 /**
6  * 会话类型
7  */
8 public enum SessionTypeEnum {
9  None(-1),
10 
11  /**
12  * 单聊
13  */
14  P2P(ITalkService.SessionType.P2P),
15 
16  /**
17  * 群聊
18  */
19  Team(ITalkService.SessionType.Team),
20 
21  /**
22  * 超大群
23  */
24  SUPER_TEAM(ITalkService.SessionType.SUPER_TEAM),
25 
26  /**
27  * 系统消息
28  */
29  System(10001),
30 
31  /**
32  * 云商服专用类型
33  */
34  Ysf(ITalkService.SessionType.Ysf),
35 
36  /**
37  * 聊天室
38  */
39  ChatRoom(10002),
40  /**
41  * 圈组
42  */
43  QChat(10003);
44 
45 
46  private int value;
47 
48  SessionTypeEnum(int value) {
49  this.value = value;
50  }
51 
52  public int getValue() {
53  return value;
54  }
55 
56  public static SessionTypeEnum typeOfValue(int value) {
57  for (SessionTypeEnum e : values()) {
58  if (e.getValue() == value) {
59  return e;
60  }
61  }
62  return P2P;
63  }
64 }