/
SAConfigOptions.java
57 lines (48 loc) · 1.3 KB
/
SAConfigOptions.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**Created by dengshiwei on 2019/03/11.
* Copyright © 2015-2019 Sensors Data Inc. All rights reserved. */
package com.sensorsdata.analytics.android.sdk;
public final class SAConfigOptions {
/**
* 请求配置地址,默认从 ServerUrl 解析
*/
private String remoteConfigUrl;
/**
* 数据上报服务器地址
*/
private String serverUrl;
/**
* 私有构造函数
*/
private SAConfigOptions(){}
/**
* 获取 SAOptionsConfig 实例
* @param serverUrl,数据上报服务器地址
*/
public SAConfigOptions(String serverUrl) {
this.serverUrl = serverUrl;
}
/**
* 设置远程配置请求地址
* @param remoteConfigUrl,远程配置请求地址
* @return SAOptionsConfig
*/
public SAConfigOptions setRemoteConfigUrl(String remoteConfigUrl) {
this.remoteConfigUrl = remoteConfigUrl;
return this;
}
/**
* 设置数据上报地址
* @param serverUrl,数据上报地址
* @return SAOptionsConfig
*/
public SAConfigOptions setServerUrl(String serverUrl) {
this.serverUrl = serverUrl;
return this;
}
String getRemoteConfigUrl() {
return remoteConfigUrl;
}
String getServerUrl() {
return serverUrl;
}
}