NIMSDK-AOS
9.19.0
basesdk
src
com
netease
nimlib
sdk
SecondTimeoutConfig.java
浏览该文件的文档.
1
package
com.netease.nimlib.sdk;
2
3
import
androidx.annotation.Nullable;
4
5
import
org.json.JSONException;
6
import
org.json.JSONObject;
7
8
import
java.io.Serializable;
9
10
/**
11
* 第二超时时间配置,即408后继续等待回包的时长
12
*/
13
public
class
SecondTimeoutConfig
implements
Serializable {
14
public
static
final
String
KEY_SEND_MESSAGE_SECOND_TIMEOUT
=
"KEY_SEND_MESSAGE_SECOND_TIMEOUT"
;
15
16
/** 发消息第二超时 */
17
public
long
sendMessageSecondTimeout
= 0;
18
19
public
JSONObject
toJson
() {
20
JSONObject
object
=
new
JSONObject();
21
try
{
22
object
.putOpt(KEY_SEND_MESSAGE_SECOND_TIMEOUT, sendMessageSecondTimeout);
23
}
catch
(JSONException e) {
24
e.printStackTrace();
25
}
26
return
object;
27
}
28
29
public
static
SecondTimeoutConfig
fromJson
(@Nullable JSONObject
object
) {
30
if
(
object
== null) {
31
return
null;
32
}
33
34
final
long
sendMessageSecondTimeout =
object
.optLong(KEY_SEND_MESSAGE_SECOND_TIMEOUT, 0L);
35
SecondTimeoutConfig
config =
new
SecondTimeoutConfig
();
36
config.
sendMessageSecondTimeout
=
sendMessageSecondTimeout
;
37
38
return
config;
39
}
40
}
com.netease.nimlib.sdk.SecondTimeoutConfig.sendMessageSecondTimeout
long sendMessageSecondTimeout
发消息第二超时
Definition:
SecondTimeoutConfig.java:17
com.netease.nimlib.sdk.SecondTimeoutConfig.toJson
JSONObject toJson()
Definition:
SecondTimeoutConfig.java:19
com.netease.nimlib.sdk.SecondTimeoutConfig.KEY_SEND_MESSAGE_SECOND_TIMEOUT
static final String KEY_SEND_MESSAGE_SECOND_TIMEOUT
Definition:
SecondTimeoutConfig.java:14
com.netease.nimlib.sdk.SecondTimeoutConfig
第二超时时间配置,即408后继续等待回包的时长
Definition:
SecondTimeoutConfig.java:13
com.netease.nimlib.sdk.SecondTimeoutConfig.fromJson
static SecondTimeoutConfig fromJson(@Nullable JSONObject object)
Definition:
SecondTimeoutConfig.java:29
生成于 2024年 十月 16日 星期三 10:25:05 , 为 NIMSDK-AOS使用
1.8.13