package com.mbridge.msdk.c; import com.ironsource.mediationsdk.utils.IronSourceConstants; import org.json.JSONObject; /* loaded from: classes4.dex */ public final class a { private String e; private String f; private int g; private int a = 1; private int b = 0; private int c = 0; private int d = 0; private int h = 0; public final int a() { return this.a; } public final int b() { return this.b; } public final int c() { return this.c; } public final int d() { return this.d; } public final String e() { return this.e; } public final String f() { return this.f; } public final int g() { return this.g; } public final int h() { return this.h; } public static a a(String str) { Exception e; a aVar; JSONObject jSONObject; try { jSONObject = new JSONObject(str); aVar = new a(); } catch (Exception e2) { e = e2; aVar = null; } try { aVar.e = jSONObject.optString("http_domain", com.mbridge.msdk.foundation.same.net.e.d.f().g); aVar.f = jSONObject.optString("tcp_domain", com.mbridge.msdk.foundation.same.net.e.d.f().k); aVar.g = jSONObject.optInt("tcp_port", com.mbridge.msdk.foundation.same.net.e.d.f().o); aVar.h = jSONObject.optInt("type", 0); int i = 1; int optInt = jSONObject.optInt("batch_size", 1); if (optInt >= 1) { i = optInt; } aVar.a = i; aVar.c = jSONObject.optInt(IronSourceConstants.EVENTS_DURATION, 0); aVar.b = jSONObject.optInt("disable", 0); aVar.d = jSONObject.optInt("e_t_l", 0); } catch (Exception e3) { e = e3; e.printStackTrace(); return aVar; } return aVar; } }