PushCommon.java
1.9 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package com.glsx.pushsdk.common;
public class PushCommon {
/**
* 是否为测试环境的开关
*/
public static boolean isRelease_V = true;
/**
* 用于判断是否为测试服务器还是开发服务器连接
*/
private static boolean loginFlag = true;
/**
* 业务服务器url
*/
public static String BUSSI_SVR_URL = "";
/**
* 业务服务器端口
*/
public static int BUSSI_SVR_port = 0;
/**
* 接收服务器url
*/
public static String ACCESS_SVR_URL = "http://192.168.0.90";
/**
* 接收服务器端口
*/
public static int ACCESS_SVR_port = 20010;
/**
* 服务链接请求超时时间 10s
*/
public static int OUT_TIME = 30 * 1000;
/**
* 心跳包请求30s发送一次
*/
public static int HEART_REQUEST_TIME = 30;
// 静态初始化数据
static {
if (isRelease_V) {// 正式环境
//ACCESS_SVR_URL = "http://14.17.102.198";//push.didihu.com.cn
//ACCESS_SVR_URL = "http://push.didihu.com.cn";
ACCESS_SVR_URL = "https://push.didihu.com.cn";
ACCESS_SVR_port = 20010;
} else {
if (loginFlag) {// 测试环境
//ACCESS_SVR_URL = "http://14.17.96.50";//push.test.didihu.com.cn
ACCESS_SVR_URL = "https://push.test.didihu.com.cn";
//Common.ACCESS_SVR_URL = "http://192.168.3.153";//接入新布一套测试环境
ACCESS_SVR_port = 20010;
} else { // 开发环境
ACCESS_SVR_URL = "https://push.test.didihu.com.cn";
//ACCESS_SVR_URL = "http://192.168.0.90";
ACCESS_SVR_port = 20010;
}
}
}
/**
* 设置业务服务器IP和端口置空
*/
public static void setPortIsEmpty() {
BUSSI_SVR_URL = "";
BUSSI_SVR_port = 0;
}
}