httpdns 缓存策略,特殊接口获取 httpdns 服务

This commit is contained in:
wangcongtao
2020-11-20 09:53:08 +08:00
parent 65a380cd42
commit 5fa8644bb3
15 changed files with 392 additions and 53 deletions

View File

@@ -0,0 +1,29 @@
package com.mogo.httpdns;
import androidx.annotation.Keep;
import com.alibaba.android.arouter.launcher.ARouter;
public
/**
* @author congtaowang
* @since 2020/11/19
*
* 描述
*/
@Keep
class MogoHttpDnsHandler {
private static IMogoHttpDns sHttpDns;
public static IMogoHttpDns getHttpDnsApi() {
if ( sHttpDns == null ) {
synchronized ( MogoHttpDnsHandler.class ) {
if ( sHttpDns == null ) {
sHttpDns = ARouter.getInstance().navigation( IMogoHttpDns.class );
}
}
}
return sHttpDns;
}
}