NIMSDK-AOS  9.16.0
ChatRoomCdnInfo.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.chatroom.model;
2 
3 import android.os.Parcel;
4 import android.os.Parcelable;
5 
6 import java.io.Serializable;
7 
8 public class ChatRoomCdnInfo implements Serializable, Parcelable {
10  boolean enable = false;
11 
18  String[] cdnUrlArray;
19 
21  long timestamp;
22 
24  long pollingInterval;
25 
27  String decryptKey;
28 
30  int timeOut;
31 
32  public ChatRoomCdnInfo() {
33  }
34 
35  public boolean isEnable() {
36  return enable;
37  }
38 
39  public void setEnable(boolean enable) {
40  this.enable = enable;
41  }
42 
43  public String[] getCdnUrlArray() {
44  return cdnUrlArray;
45  }
46 
47  public void setCdnUrlArray(String[] cdnUrlArray) {
48  this.cdnUrlArray = cdnUrlArray;
49  }
50 
51  public long getTimestamp() {
52  return timestamp;
53  }
54 
55  public void setTimestamp(long timestamp) {
56  this.timestamp = timestamp;
57  }
58 
59  public long getPollingInterval() {
60  return pollingInterval;
61  }
62 
63  public void setPollingInterval(long pollingInterval) {
64  this.pollingInterval = pollingInterval;
65  }
66 
67  public String getDecryptKey() {
68  return decryptKey;
69  }
70 
71  public void setDecryptKey(String decryptKey) {
72  this.decryptKey = decryptKey;
73  }
74 
75  public int getTimeOut() {
76  return timeOut;
77  }
78 
79  public void setTimeOut(int timeOut) {
80  this.timeOut = timeOut;
81  }
82 
84  ChatRoomCdnInfo newInstance = new ChatRoomCdnInfo();
85  newInstance.setEnable(enable);
86  newInstance.setCdnUrlArray(cdnUrlArray);
87  newInstance.setTimestamp(timestamp);
88  newInstance.setPollingInterval(pollingInterval);
89  newInstance.setDecryptKey(decryptKey);
90  newInstance.setTimeOut(timeOut);
91  return newInstance;
92  }
93 
97  protected ChatRoomCdnInfo(Parcel in) {
98  enable = in.readInt() == 1;
99  in.readStringArray(cdnUrlArray);
100  timestamp = in.readLong();
101  pollingInterval = in.readLong();
102  decryptKey = in.readString();
103  timeOut = in.readInt();
104  }
105 
106  @Override
107  public int describeContents() {
108  return 0;
109  }
110 
111  @Override
112  public void writeToParcel(Parcel dest, int flags) {
113  dest.writeInt(enable ? 1 : 0);
114  dest.writeStringArray(cdnUrlArray);
115  dest.writeLong(timestamp);
116  dest.writeLong(pollingInterval);
117  dest.writeString(decryptKey);
118  dest.writeInt(timeOut);
119  }
120 
121  public static final Creator<ChatRoomCdnInfo> CREATOR = new Creator<ChatRoomCdnInfo>() {
122  @Override
123  public ChatRoomCdnInfo createFromParcel(Parcel in) {
124  return new ChatRoomCdnInfo(in);
125  }
126 
127  @Override
128  public ChatRoomCdnInfo[] newArray(int size) {
129  return new ChatRoomCdnInfo[size];
130  }
131  };
132 }
static final Creator< ChatRoomCdnInfo > CREATOR
ChatRoomCdnInfo(Parcel in)
********************************** 序列化 **********************************