Package io.rong.imlib
Class CMPStrategy
-
- All Implemented Interfaces:
public class CMPStrategy
*Basic Strategy:** After obtaining the cmp list from the navigation, save a copy in both the sp file and memory. The list saved in the sp file serves as the baseline. During the connection process, adjust the order of cmp in memory based on the connection status.
**Reconnection:** If the network remains unchanged, use the cmp list in memory. Otherwise, use the baseline cmp list from the sp file. **Special Case Handling:** If a connection is successfully established but returns error code 32054 or a ping timeout occurs, adjust the cmp order by moving the first cmp entry to the end.
-
-
Constructor Summary
Constructors Constructor Description CMPStrategy()
-
Method Summary
Modifier and Type Method Description static CMPStrategy
getInstance()
void
onGetCmpEntriesFromNavi()
List<CmpData>
getCmpList()
boolean
isQuicForConnectedCmp()
boolean
isCMPValid(String cmp)
-
-
Method Detail
-
getInstance
static CMPStrategy getInstance()
-
onGetCmpEntriesFromNavi
void onGetCmpEntriesFromNavi()
-
getCmpList
List<CmpData> getCmpList()
-
isQuicForConnectedCmp
boolean isQuicForConnectedCmp()
-
isCMPValid
boolean isCMPValid(String cmp)
-
-
-
-