Files
MoGoEagleEye/foudations/httpdns-base/src/main/java/com/mogo/httpdns/IMogoHttpDns.java

54 lines
1.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.mogo.httpdns;
import androidx.annotation.Keep;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.mogo.cloud.httpdns.listener.OnAddressChangedListener;
/**
* @author congtaowang
* @since 2020/11/18
* <p>
* http 请求做http dns转换
*/
@Keep
public interface IMogoHttpDns extends IProvider {
/**
* 获取缓存中的dns ip地址
*
* @param host domain
* @param type 类型
* @return
*/
@Keep
String getCachedHttpDnsIps(String host, int type);
/**
* dns解析
*
* @param host
* @param type
* @param useCache
* @param callback
*/
@Keep
void getHttpDnsIp(String host, int type, boolean useCache, IHttpDnsCallback callback);
/**
* 同步进行dns解析无需回调
*
* @param host
* @param type
* @param useCache
* @return ip:port
*/
String syncGetHttpDns(String host, int type, boolean useCache);
/**
* 注册HttpDns地址变化监听
* @param listener {@link OnAddressChangedListener}
*/
void addressChangedListener(OnAddressChangedListener listener);
}