NIMSDK-AOS  10.5.0
InviteParamBuilder.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.avsignalling.builder;
2 
3 import android.text.TextUtils;
4 
5 import com.netease.nimlib.avsignalling.model.InviteParam;
9 
13 public class InviteParamBuilder {
14 
15  private String channelId;
16  private String accountId;
17  private String requestId;
18  private String customInfo;
19  private SignallingPushConfig pushConfig;
20  private boolean offlineEnabled;
21 
30  public InviteParamBuilder(String channelId, String accountId, String requestId) {
31  this.channelId = channelId;
32  this.accountId = accountId;
33  this.requestId = requestId;
34  }
35 
40  public InviteParamBuilder customInfo(String customInfo) {
41  this.customInfo = customInfo;
42  return this;
43  }
44 
49  public InviteParamBuilder pushConfig(SignallingPushConfig signallingPushConfig) {
50  this.pushConfig = signallingPushConfig;
51  return this;
52  }
53 
58  public InviteParamBuilder offlineEnabled(boolean offlineEnabled) {
59  this.offlineEnabled = offlineEnabled;
60  return this;
61  }
62 
63  public InviteParam build() {
64  if (TextUtils.isEmpty(channelId) || TextUtils.isEmpty(accountId) || TextUtils.isEmpty(requestId)) {
65  throw new IllegalArgumentException("InviteParamBuilder illegal , (channelId , accountId , requestId) parameters must not null");
66  }
67  return new InviteParam(channelId, accountId, requestId, customInfo, offlineEnabled, pushConfig);
68  }
69 
70 
71 }
72 
InviteParamBuilder offlineEnabled(boolean offlineEnabled)
InviteParamBuilder(String channelId, String accountId, String requestId)
InviteParamBuilder pushConfig(SignallingPushConfig signallingPushConfig)
构造邀请相关操作的参数 ,其中channelId、accountId、requestId 这3个参数必须设置