package com.bytedance.ies.bullet.service.base.resourceloader.config;

import X.2Pr;
import X.7xU;
import X.C1421KcO;
import X.C1422KcP;
import X.C1424KcR;
import X.C1431KcY;
import X.C4949LsC;
import X.KTQ;
import X.L7A;
import X.L7M;
import X.M12;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.bullet.service.base.IResourceLoaderService;
import kotlin.h.b.n;

public abstract class IXResourceLoader implements C1422KcP {
    public final String TAG;
    public C1431KcY loaderLogger;
    public IResourceLoaderService service;

    static {
        Covode.recordClassIndex(28601);
    }

    public abstract void cancelLoad();

    public abstract void loadAsync(L7A l7a, L7M l7m, C4949LsC<? super L7A, 2Pr> lsC, C4949LsC<? super Throwable, 2Pr> lsC2);

    public abstract L7A loadSync(L7A l7a, L7M l7m);

    public final C1431KcY getLoaderLogger() {
        return this.loaderLogger;
    }

    public String getTAG() {
        return this.TAG;
    }

    public final IResourceLoaderService getService() {
        IResourceLoaderService iResourceLoaderService = this.service;
        if (iResourceLoaderService == null) {
            n.LIZ("");
        }
        return iResourceLoaderService;
    }

    public IXResourceLoader() {
        String simpleName = getClass().getSimpleName();
        n.LIZ(simpleName, "");
        this.TAG = simpleName;
    }

    public C1431KcY getLoggerWrapper() {
        C1431KcY kcY = this.loaderLogger;
        if (kcY != null) {
            return kcY;
        }
        IResourceLoaderService iResourceLoaderService = this.service;
        if (iResourceLoaderService != null) {
            return ((KTQ) iResourceLoaderService).getLoggerWrapper();
        }
        n.LIZ("");
        throw new 7xU("null cannot be cast to non-null type com.bytedance.ies.bullet.service.base.impl.BaseBulletService");
    }

    public final void setLoaderLogger(C1431KcY kcY) {
        this.loaderLogger = kcY;
    }

    public final void setService(IResourceLoaderService iResourceLoaderService) {
        M12.LIZ((Object) iResourceLoaderService);
        this.service = iResourceLoaderService;
    }

    public void printReject(Throwable th, String str) {
        M12.LIZ((Object) th, (Object) str);
        C1421KcO.LIZ(this, th, str);
    }

    public void printLog(String str, C1424KcR kcR, String str2) {
        M12.LIZ(str, kcR, str2);
        C1421KcO.LIZ(this, str, kcR, str2);
    }
}
