导航菜单

页面标题

页面副标题

微商客 v2.1.2 - a.java 源代码

正在查看: 微商客 v2.1.2 应用的 a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.qiyukf.httpdns.j.b;

import android.text.TextUtils;
import com.qiyukf.httpdns.util.h;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public abstract class a implements c {
    private static final String a = "a";

    protected void a() {
    }

    protected void a(boolean z) {
    }

    protected abstract String b();

    protected abstract String b(com.qiyukf.httpdns.j.d dVar);

    protected abstract String b(boolean z);

    protected final com.qiyukf.httpdns.i.a.b.a a(com.qiyukf.httpdns.j.d dVar) {
        if (dVar == null) {
            if (h.a.a()) {
                h.a.a(a + "requestServerDiscovery, serverRequestTask is null !");
            }
            return null;
        }
        if (dVar.e() > 2) {
            if (h.a.a()) {
                h.a.a(a + "requestServerDiscovery, serverRequestTask is null !");
            }
            return null;
        }
        String b = b(dVar);
        if (TextUtils.isEmpty(b)) {
            if (h.a.a()) {
                h.a.a(a + "requestServerDiscovery, getServerDiscoveryHost is null !");
            }
            return null;
        }
        String str = "https://" + b + ":443/httpdns/v2/s";
        if (TextUtils.isEmpty(str)) {
            return null;
        }
        b();
        com.qiyukf.httpdns.h.d a2 = com.qiyukf.httpdns.d.a.a(str, c());
        if (a2.d() || !a2.b() || a(a2)) {
            dVar.f();
            if (h.a.a()) {
                h.a.a(a + "requestServerDiscovery, 请求失败,尝试重新请求,index: " + dVar.e());
            }
            a(dVar);
            return null;
        }
        if (h.a.a()) {
            h.a.a(a + "requestServerDiscovery, 请求成功: " + a2.a());
        }
        return new com.qiyukf.httpdns.i.a.b.a(com.qiyukf.httpdns.util.f.a(), a2.a(), dVar.b(), dVar.a());
    }

    protected final com.qiyukf.httpdns.h.d a(com.qiyukf.httpdns.j.a r7) throws java.lang.Exception {
        throw new UnsupportedOperationException("Method not decompiled: com.qiyukf.httpdns.j.b.a.a(com.qiyukf.httpdns.j.a):com.qiyukf.httpdns.h.d");
    }

    private static String a(List<String> list) {
        if (list == null || list.isEmpty()) {
            return null;
        }
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < list.size(); i++) {
            String str = list.get(i);
            if (TextUtils.isEmpty(str)) {
                str = null;
            } else {
                if (str.contains("http://")) {
                    str = str.replace("http://", "");
                }
                if (str.contains("https://")) {
                    str = str.replace("https://", "");
                }
            }
            sb.append(str).append(",");
        }
        String sb2 = sb.toString();
        if (TextUtils.isEmpty(sb2)) {
            return null;
        }
        return sb2.substring(0, sb2.length() - 1);
    }

    private Map<String, String> c() {
        HashMap hashMap = new HashMap();
        hashMap.put("Accept-Encoding", "gzip");
        hashMap.put("X-SDK-VERSION", "1.3.0.6");
        hashMap.put("Host", b());
        hashMap.put("Content-Type", "application/json");
        com.qiyukf.httpdns.b.b e = com.qiyukf.httpdns.a.a().e();
        long currentTimeMillis = System.currentTimeMillis();
        String k = e.k();
        hashMap.put("netease-app", k);
        hashMap.put("netease-sign", a(k, currentTimeMillis));
        hashMap.put("timestamp", String.valueOf(currentTimeMillis));
        return hashMap;
    }

    private static boolean a(com.qiyukf.httpdns.h.d r6) {
        throw new UnsupportedOperationException("Method not decompiled: com.qiyukf.httpdns.j.b.a.a(com.qiyukf.httpdns.h.d):boolean");
    }

    private static String a(String str, long j) {
        return com.qiyukf.httpdns.util.e.a("httpdns-" + str + "-" + j);
    }
}