正在查看: OLX India v19.42.007 应用的 PanameraRemoteClientFactory.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OLX India v19.42.007 应用的 PanameraRemoteClientFactory.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.olxgroup.panamera.data.common.infrastructure.clients;
import com.google.gson.Gson;
import com.olx.network.c;
import com.olx.network.e;
import com.olx.network.f;
import com.olxgroup.panamera.data.common.Constants;
import com.olxgroup.panamera.data.common.infrastructure.utils.JsonUtils;
import com.olxgroup.panamera.data.users.auth.mapper.MigrateTokenMapper;
import com.olxgroup.panamera.data.users.auth.mapper.RefreshTokenMapper;
import com.olxgroup.panamera.domain.common.infrastruture.repository.ApplicationSettings;
import com.olxgroup.panamera.domain.common.infrastruture.repository.SelectedMarket;
import com.olxgroup.panamera.domain.shell.LoggerDomainContract;
import com.olxgroup.panamera.domain.users.common.repository.service.UserService;
import java.io.File;
import java.util.Map;
import kotlin.Lazy;
import kotlin.Metadata;
import olx.com.delorean.data.net.ExpiredTokenExecutor;
import olx.com.delorean.data.net.NetworkDebugger;
import olx.com.delorean.data.net.PanameraErrorsInterceptor;
import olx.com.delorean.data.net.RequestRetryInterceptor;
import olx.com.delorean.domain.DeviceRepository;
import olx.com.delorean.domain.repository.UserSessionRepository;
import olx.com.delorean.domain.service.ab.ABTestService;
@Metadata
public class PanameraRemoteClientFactory implements RemoteClientFactory {
private final ABTestService abTestService;
private final String baseUrl;
private final c botManagerService;
private final File cacheDir;
private final com.olx.network.internal.certificatepinner.b certificationManager;
private final f networkConfiguration;
private final long retriesWaits;
public PanameraRemoteClientFactory(SelectedMarket selectedMarket, String str, Gson gson, Lazy<? extends UserSessionRepository> lazy, Lazy<? extends UserService> lazy2, Lazy<? extends DeviceRepository> lazy3, LoggerDomainContract loggerDomainContract, File file, c cVar, ApplicationSettings applicationSettings, com.olx.network.internal.a aVar, NetworkDebugger networkDebugger, com.olx.network.internal.certificatepinner.b bVar, ABTestService aBTestService) {
this.cacheDir = file;
this.botManagerService = cVar;
this.certificationManager = bVar;
this.abTestService = aBTestService;
String b = (selectedMarket.getMarket() == null || selectedMarket.getMarket().c() == null || selectedMarket.getMarket().c().b() == null || selectedMarket.getMarket().c().b().length() <= 0) ? "https://api.olx.in" : selectedMarket.getMarket().c().b();
this.baseUrl = b;
f fVar = new f(b, "android " + str, JsonUtils.getCustomGson(), applicationSettings.isDebugBuild(), applicationSettings.isLoggingEnabled(), aVar);
this.networkConfiguration = fVar;
this.retriesWaits = 500L;
RefreshTokenMapper refreshTokenMapper = new RefreshTokenMapper(gson);
MigrateTokenMapper migrateTokenMapper = new MigrateTokenMapper(gson);
fVar.addInterceptor(new PanameraErrorsInterceptor(gson));
fVar.addInterceptor(new ExpiredTokenExecutor((UserSessionRepository) lazy.getValue(), applicationSettings.getAkamaiEnvironmentCustomHeader().c(), applicationSettings.getAkamaiEnvironmentCustomHeader().d(), b, (UserService) lazy2.getValue(), loggerDomainContract, refreshTokenMapper, migrateTokenMapper));
fVar.addInterceptor(new RequestRetryInterceptor(500L, cVar, loggerDomainContract));
fVar.setCustomHeaders(applicationSettings.getCustomHeadersKeyValueMap());
networkDebugger.addDebuggerTo(fVar);
fVar.addHeader(Constants.FINGERPRINT_HEADER, ((DeviceRepository) lazy3.getValue()).getFingerprint());
}
@Override
public <T> T createRemoteClient(Class<T> cls) {
return (T) e.a(cls, this.networkConfiguration, this.cacheDir, this.certificationManager, (Map) null, this.botManagerService, (Map) null, this.abTestService.getConnectionTimeout());
}
public final String getBaseUrl() {
return this.baseUrl;
}
public final f getNetworkConfiguration$data_release() {
return this.networkConfiguration;
}
}