NIMSDK-AOS  9.16.0
CallExParam.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.avsignalling.model;
2 
4 
5 public class CallExParam {
6 
7  private final ChannelType channelType;
8  private final String accountId;
9  private final String requestId;
10 
11  private String channelName;
12  private String channelExt;
13  private Long selfUid;
14  private Boolean offlineEnable;
15  private String customInfo;
16  private SignallingPushConfig pushConfig;
17  private String nertcChannelName;
18  private Long nertcTokenTtl;
19  private String nertcJoinRoomQueryParamMap;
20 
21  private CallExParam(ChannelType channelType, String accountId, String requestId) {
22  this.channelType = channelType;
23  this.accountId = accountId;
24  this.requestId = requestId;
25  }
26 
31  return channelType;
32  }
33 
37  public String getAccountId() {
38  return accountId;
39  }
40 
44  public String getRequestId() {
45  return requestId;
46  }
47 
51  public String getChannelName() {
52  return channelName;
53  }
54 
58  public String getChannelExt() {
59  return channelExt;
60  }
61 
65  public Long getSelfUid() {
66  return selfUid;
67  }
68 
72  public Boolean getOfflineEnable() {
73  return offlineEnable;
74  }
75 
79  public String getCustomInfo() {
80  return customInfo;
81  }
82 
87  return pushConfig;
88  }
89 
93  public String getNertcChannelName() {
94  return nertcChannelName;
95  }
96 
100  public Long getNertcTokenTtl() {
101  return nertcTokenTtl;
102  }
103 
108  return nertcJoinRoomQueryParamMap;
109  }
110 
111  public static final class CallExParamBuilder {
112  private final ChannelType channelType;
113  private final String accountId;
114  private final String requestId;
115  private String channelName;
116  private String channelExt;
117  private Long selfUid;
118  private Boolean offlineEnable;
119  private String customInfo;
120  private SignallingPushConfig pushConfig;
121  private String nertcChannelName;
122  private Long nertcTokenTtl;
123  private String nertcJoinRoomQueryParamMap;
124 
125  /***
126  * @param channelType 频道类型
127  * @param accountId 对方的accid
128  * @param requestId 邀请id ,发起邀请者自行生成(要保证唯一性)
129  */
130  public CallExParamBuilder(ChannelType channelType, String accountId, String requestId) {
131  this.channelType = channelType;
132  this.accountId = accountId;
133  this.requestId = requestId;
134  }
135 
139  public CallExParamBuilder withChannelName(String channelName) {
140  this.channelName = channelName;
141  return this;
142  }
143 
147  public CallExParamBuilder withChannelExt(String channelExt) {
148  this.channelExt = channelExt;
149  return this;
150  }
151 
155  public CallExParamBuilder withSelfUid(Long selfUid) {
156  this.selfUid = selfUid;
157  return this;
158  }
159 
163  public CallExParamBuilder withOfflineEnable(Boolean offlineEnable) {
164  this.offlineEnable = offlineEnable;
165  return this;
166  }
167 
171  public CallExParamBuilder withCustomInfo(String customInfo) {
172  this.customInfo = customInfo;
173  return this;
174  }
175 
179  public CallExParamBuilder withPushConfig(SignallingPushConfig pushConfig) {
180  this.pushConfig = pushConfig;
181  return this;
182  }
183 
187  public CallExParamBuilder withNertcChannelName(String nertcChannelName) {
188  this.nertcChannelName = nertcChannelName;
189  return this;
190  }
191 
195  public CallExParamBuilder withNertcTokenTtl(Long nertcTokenTtl) {
196  this.nertcTokenTtl = nertcTokenTtl;
197  return this;
198  }
199 
203  public CallExParamBuilder withNertcJoinRoomQueryParamMap(String nertcJoinRoomQueryParamMap) {
204  this.nertcJoinRoomQueryParamMap = nertcJoinRoomQueryParamMap;
205  return this;
206  }
207 
208  public CallExParam build() {
209  CallExParam callExParam = new CallExParam( this.channelType, this.accountId, this.requestId);
210  callExParam.nertcChannelName = this.nertcChannelName;
211  callExParam.channelExt = this.channelExt;
212  callExParam.pushConfig = this.pushConfig;
213  callExParam.channelName = this.channelName;
214  callExParam.customInfo = this.customInfo;
215  callExParam.nertcJoinRoomQueryParamMap = this.nertcJoinRoomQueryParamMap;
216  callExParam.selfUid = this.selfUid;
217  callExParam.offlineEnable = this.offlineEnable;
218  callExParam.nertcTokenTtl = this.nertcTokenTtl;
219  return callExParam;
220  }
221  }
222 }
String getCustomInfo()
获取邀请者附加的自定义信息,透传给被邀请者
String getChannelExt()
获取频道扩展字段
String getNertcChannelName()
获取云信G2-RTC的房间名
String getNertcJoinRoomQueryParamMap()
获取云信G2-RTC加入房间的请求参数
ChannelType getChannelType()
获取频道类型
Boolean getOfflineEnable()
相应的通知是否存离线
Long getNertcTokenTtl()
获取云信G2-RTC的token的有效期
SignallingPushConfig getPushConfig()
获取推送配置