正在查看: CallApp v2.226 应用的 o.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CallApp v2.226 应用的 o.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package ns;
import io.bidmachine.media3.common.util.Log;
import io.grpc.StatusException;
import io.grpc.internal.b8;
import io.grpc.internal.e3;
import io.grpc.internal.f3;
import io.grpc.internal.g4;
import io.grpc.internal.h4;
import io.grpc.internal.h5;
import io.grpc.internal.i8;
import io.grpc.internal.l3;
import io.grpc.internal.m3;
import io.grpc.internal.n0;
import io.grpc.internal.n3;
import io.grpc.internal.o0;
import io.grpc.internal.o3;
import io.grpc.internal.q0;
import io.grpc.internal.r3;
import io.grpc.internal.t7;
import io.grpc.internal.y0;
import java.io.EOFException;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.URI;
import java.util.Collections;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.net.SocketFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSocketFactory;
import lx.h0;
import mj.l;
import ms.b;
import ms.j1;
import ms.j2;
import ms.l2;
import ms.m0;
import ms.o1;
import ms.u0;
import ns.d;
import ns.d.a;
import ns.d0;
import ns.d0.a;
import ns.j;
import ns.n;
import os.g;
public class o implements y0, e, e0 {
public static final Map U;
public static final Logger V;
public final SocketFactory A;
public final SSLSocketFactory B;
public final HostnameVerifier C;
public int D;
public final LinkedList E;
public final io.grpc.okhttp.internal.c F;
public g4 G;
public boolean H;
public long I;
public long J;
public boolean K;
public final Runnable L;
public final int M;
public final boolean N;
public final i8 O;
public final a P;
public final m0 Q;
public final int R;
public final Runnable S;
public final sj.a0 T;
public final InetSocketAddress a;
public final String b;
public final String c;
public final Random d;
public final mj.c0 e;
public final int f;
public final os.j g;
public r3.e h;
public f i;
public d0 j;
public final Object k;
public final u0 l;
public int m;
public final HashMap n;
public final Executor o;
public final t7 p;
public final ScheduledExecutorService q;
public final int r;
public int s;
public b t;
public ms.b u;
public j2 v;
public boolean w;
public n3 x;
public boolean y;
public boolean z;
public class a extends o3 {
public a() {
}
@Override
public final void a() {
o.this.h.c(true);
}
@Override
public final void b() {
o.this.h.c(false);
}
}
public class b implements Runnable {
public final os.b b;
public final u a = new u(Level.FINE, (Class<?>) o.class);
public boolean c = true;
public b(os.b bVar) {
this.b = bVar;
}
@Override
public final void run() {
o oVar;
j2 j2Var;
String name = Thread.currentThread().getName();
Thread.currentThread().setName("OkHttpClientTransport");
while (((g.c) this.b).a(this)) {
try {
g4 g4Var = o.this.G;
if (g4Var != null) {
g4Var.a();
}
} catch (Throwable th) {
try {
o oVar2 = o.this;
os.a aVar = os.a.PROTOCOL_ERROR;
j2 f = j2.m.g("error in frame handler").f(th);
Map map = o.U;
oVar2.s(0, aVar, f);
try {
this.b.close();
} catch (IOException e) {
o.V.log(Level.INFO, "Exception closing frame reader", (Throwable) e);
} catch (RuntimeException e2) {
if (!"bio == null".equals(e2.getMessage())) {
throw e2;
}
}
oVar = o.this;
} catch (Throwable th2) {
try {
this.b.close();
} catch (IOException e3) {
o.V.log(Level.INFO, "Exception closing frame reader", (Throwable) e3);
} catch (RuntimeException e4) {
if (!"bio == null".equals(e4.getMessage())) {
throw e4;
}
}
o.this.h.a();
Thread.currentThread().setName(name);
throw th2;
}
}
}
synchronized (o.this.k) {
j2Var = o.this.v;
}
if (j2Var == null) {
j2Var = j2.n.g("End of stream or IOException");
}
o.this.s(0, os.a.INTERNAL_ERROR, j2Var);
try {
this.b.close();
} catch (IOException e5) {
o.V.log(Level.INFO, "Exception closing frame reader", (Throwable) e5);
} catch (RuntimeException e6) {
if (!"bio == null".equals(e6.getMessage())) {
throw e6;
}
}
oVar = o.this;
oVar.h.a();
Thread.currentThread().setName(name);
}
}
static {
EnumMap enumMap = new EnumMap(os.a.class);
os.a aVar = os.a.NO_ERROR;
j2 j2Var = j2.m;
enumMap.put((EnumMap) aVar, (os.a) j2Var.g("No error: A GRPC status of OK should have been sent"));
enumMap.put((EnumMap) os.a.PROTOCOL_ERROR, (os.a) j2Var.g("Protocol error"));
enumMap.put((EnumMap) os.a.INTERNAL_ERROR, (os.a) j2Var.g("Internal error"));
enumMap.put((EnumMap) os.a.FLOW_CONTROL_ERROR, (os.a) j2Var.g("Flow control error"));
enumMap.put((EnumMap) os.a.STREAM_CLOSED, (os.a) j2Var.g("Stream closed"));
enumMap.put((EnumMap) os.a.FRAME_TOO_LARGE, (os.a) j2Var.g("Frame too large"));
enumMap.put((EnumMap) os.a.REFUSED_STREAM, (os.a) j2.n.g("Refused stream"));
enumMap.put((EnumMap) os.a.CANCEL, (os.a) j2.f.g("Cancelled"));
enumMap.put((EnumMap) os.a.COMPRESSION_ERROR, (os.a) j2Var.g("Compression error"));
enumMap.put((EnumMap) os.a.CONNECT_ERROR, (os.a) j2Var.g("Connect error"));
enumMap.put((EnumMap) os.a.ENHANCE_YOUR_CALM, (os.a) j2.k.g("Enhance your calm"));
enumMap.put((EnumMap) os.a.INADEQUATE_SECURITY, (os.a) j2.i.g("Inadequate security"));
U = Collections.unmodifiableMap(enumMap);
V = Logger.getLogger(o.class.getName());
}
public o(j.e eVar, InetSocketAddress inetSocketAddress, String str, String str2, ms.b bVar, m0 m0Var, Runnable runnable) {
this(eVar, inetSocketAddress, str, str2, bVar, f3.r, new os.g(), m0Var, runnable);
}
public static void g(o oVar, os.a aVar, String str) {
oVar.getClass();
oVar.s(0, aVar, w(aVar).a(str));
}
public static Socket h(o oVar, InetSocketAddress inetSocketAddress, InetSocketAddress inetSocketAddress2, String str, String str2) {
String str3;
int i;
String str4;
oVar.getClass();
Socket socket = null;
try {
InetAddress address = inetSocketAddress2.getAddress();
SocketFactory socketFactory = oVar.A;
Socket createSocket = address != null ? socketFactory.createSocket(inetSocketAddress2.getAddress(), inetSocketAddress2.getPort()) : socketFactory.createSocket(inetSocketAddress2.getHostName(), inetSocketAddress2.getPort());
try {
createSocket.setTcpNoDelay(true);
createSocket.setSoTimeout(oVar.R);
py.f0 g0 = h0.g0(createSocket);
py.x p = h0.p(h0.c0(createSocket));
ps.d i2 = oVar.i(inetSocketAddress, str, str2);
io.grpc.okhttp.internal.f fVar = i2.b;
ps.b bVar = i2.a;
Locale locale = Locale.US;
p.f0("CONNECT " + bVar.a + ":" + bVar.b + " HTTP/1.1");
p.f0("\r\n");
int length = fVar.a.length / 2;
for (int i3 = 0; i3 < length; i3++) {
int i4 = i3 * 2;
String[] strArr = fVar.a;
if (i4 >= 0 && i4 < strArr.length) {
str3 = strArr[i4];
p.f0(str3);
p.f0(": ");
i = i4 + 1;
if (i >= 0 && i < strArr.length) {
str4 = strArr[i];
p.f0(str4);
p.f0("\r\n");
}
str4 = null;
p.f0(str4);
p.f0("\r\n");
}
str3 = null;
p.f0(str3);
p.f0(": ");
i = i4 + 1;
if (i >= 0) {
str4 = strArr[i];
p.f0(str4);
p.f0("\r\n");
}
str4 = null;
p.f0(str4);
p.f0("\r\n");
}
p.f0("\r\n");
p.flush();
io.grpc.okhttp.internal.l a2 = io.grpc.okhttp.internal.l.a(q(g0));
while (!q(g0).equals("")) {
}
int i5 = a2.b;
if (i5 >= 200 && i5 < 300) {
createSocket.setSoTimeout(0);
return createSocket;
}
py.e eVar = new py.e();
try {
createSocket.shutdownOutput();
g0.read(eVar, 1024L);
} catch (IOException e) {
eVar.Y0("Unable to read body: " + e.toString());
}
try {
createSocket.close();
} catch (IOException unused) {
}
Locale locale2 = Locale.US;
throw new StatusException(j2.n.g("Response returned from proxy was not successful (expected 2xx, got " + i5 + " " + a2.c + "). Response body:\n" + eVar.I0()));
} catch (IOException e2) {
e = e2;
socket = createSocket;
if (socket != null) {
f3.b(socket);
}
throw new StatusException(j2.n.g("Failed trying to connect with proxy").f(e));
}
} catch (IOException e3) {
e = e3;
}
}
public static String q(py.f0 f0Var) {
py.e eVar = new py.e();
while (f0Var.read(eVar, 1L) != -1) {
if (eVar.C0(eVar.b - 1) == 10) {
return eVar.b0(Long.MAX_VALUE);
}
}
throw new EOFException("\\n not found: " + eVar.j(eVar.b).e());
}
public static j2 w(os.a aVar) {
j2 j2Var = (j2) U.get(aVar);
if (j2Var != null) {
return j2Var;
}
return j2.g.g("Unknown http2 error code: " + aVar.httpCode);
}
@Override
public final u0 a() {
return this.l;
}
@Override
public final Runnable b(h5 h5Var) {
this.h = (r3.e) h5Var;
if (this.H) {
g4 g4Var = new g4(new g4.c(this), this.q, this.I, this.J, this.K);
this.G = g4Var;
synchronized (g4Var) {
if (g4Var.d) {
g4Var.b();
}
}
}
d b2 = d.b(this.p, this);
os.j jVar = this.g;
py.x p = h0.p(b2);
((os.g) jVar).getClass();
d.a aVar = b2.new a(new g.d(p, true));
synchronized (this.k) {
try {
f fVar = new f(this, aVar);
this.i = fVar;
this.j = new d0(this, fVar);
} catch (Throwable th) {
th = th;
while (true) {
try {
throw th;
} catch (Throwable th2) {
th = th2;
}
}
}
}
CountDownLatch countDownLatch = new CountDownLatch(1);
CountDownLatch countDownLatch2 = new CountDownLatch(1);
CyclicBarrier cyclicBarrier = new CyclicBarrier(2);
this.p.execute(new r(this, countDownLatch, cyclicBarrier, b2, countDownLatch2));
this.o.execute(new s(this, cyclicBarrier, countDownLatch2));
try {
r();
countDownLatch.countDown();
this.p.execute(new t(this));
return null;
} catch (Throwable th3) {
countDownLatch.countDown();
throw th3;
}
}
@Override
public final void c(j2 j2Var) {
e(j2Var);
synchronized (this.k) {
try {
Iterator it = this.n.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
it.remove();
((n) entry.getValue()).m.k(j2Var, false, new j1());
o((n) entry.getValue());
}
for (n nVar : this.E) {
nVar.m.j(j2Var, o0.MISCARRIED, true, new j1());
o(nVar);
}
this.E.clear();
v();
} catch (Throwable th) {
throw th;
}
}
}
@Override
public final n0 d(o1 o1Var, j1 j1Var, ms.e eVar, ms.o[] oVarArr) {
n nVar;
mj.q.h(o1Var, "method");
mj.q.h(j1Var, "headers");
ms.b bVar = this.u;
b8 b8Var = new b8(oVarArr);
for (ms.o oVar : oVarArr) {
oVar.o(bVar, j1Var);
}
synchronized (this.k) {
nVar = new n(o1Var, j1Var, this.i, this, this.j, this.k, this.r, this.f, this.b, this.c, b8Var, this.O, eVar, this.N);
}
return nVar;
}
@Override
public final void e(j2 j2Var) {
synchronized (this.k) {
try {
if (this.v != null) {
return;
}
this.v = j2Var;
this.h.b(j2Var);
v();
} catch (Throwable th) {
throw th;
}
}
}
@Override
public final void f(h4 h4Var, sj.k kVar) {
long nextLong;
synchronized (this.k) {
try {
boolean z = true;
mj.q.k(this.i != null);
if (this.y) {
StatusException m = m();
Logger logger = n3.g;
try {
kVar.execute(new m3(h4Var, m));
} catch (Throwable th) {
n3.g.log(Level.SEVERE, "Failed to execute PingCallback", th);
}
return;
}
n3 n3Var = this.x;
if (n3Var != null) {
nextLong = 0;
z = false;
} else {
nextLong = this.d.nextLong();
mj.a0 a0Var = (mj.a0) this.e.get();
a0Var.b();
n3 n3Var2 = new n3(nextLong, a0Var);
this.x = n3Var2;
this.O.getClass();
n3Var = n3Var2;
}
if (z) {
this.i.ping(false, (int) (nextLong >>> 32), (int) nextLong);
}
synchronized (n3Var) {
try {
if (!n3Var.d) {
n3Var.c.put(h4Var, kVar);
return;
}
StatusException statusException = n3Var.e;
Runnable m3Var = statusException != null ? new m3(h4Var, statusException) : new l3(h4Var, n3Var.f);
try {
kVar.execute(m3Var);
} catch (Throwable th2) {
n3.g.log(Level.SEVERE, "Failed to execute PingCallback", th2);
}
} finally {
}
}
} finally {
}
}
}
@Override
public final ms.b getAttributes() {
return this.u;
}
public final ps.d i(java.net.InetSocketAddress r22, java.lang.String r23, java.lang.String r24) {
throw new UnsupportedOperationException("Method not decompiled: ns.o.i(java.net.InetSocketAddress, java.lang.String, java.lang.String):ps.d");
}
public final void j(int i, j2 j2Var, o0 o0Var, boolean z, os.a aVar, j1 j1Var) {
synchronized (this.k) {
try {
n nVar = (n) this.n.remove(Integer.valueOf(i));
if (nVar != null) {
if (aVar != null) {
this.i.p(i, os.a.CANCEL);
}
if (j2Var != null) {
n.b bVar = nVar.m;
if (j1Var == null) {
j1Var = new j1();
}
bVar.j(j2Var, o0Var, z, j1Var);
}
if (!t()) {
v();
}
o(nVar);
}
} catch (Throwable th) {
throw th;
}
}
}
public final d0.a[] k() {
d0.a[] aVarArr;
d0.a aVar;
synchronized (this.k) {
aVarArr = new d0.a[this.n.size()];
Iterator it = this.n.values().iterator();
int i = 0;
while (it.hasNext()) {
int i2 = i + 1;
n.b bVar = ((n) it.next()).m;
synchronized (bVar.x) {
aVar = bVar.K;
}
aVarArr[i] = aVar;
i = i2;
}
}
return aVarArr;
}
public final int l() {
URI a2 = f3.a(this.b);
return a2.getPort() != -1 ? a2.getPort() : this.a.getPort();
}
public final StatusException m() {
synchronized (this.k) {
j2 j2Var = this.v;
if (j2Var != null) {
return new StatusException(j2Var);
}
return new StatusException(j2.n.g("Connection closed"));
}
}
public final boolean n(int i) {
boolean z;
synchronized (this.k) {
if (i < this.m) {
z = true;
if ((i & 1) == 1) {
}
}
z = false;
}
return z;
}
public final void o(ns.n r5) {
throw new UnsupportedOperationException("Method not decompiled: ns.o.o(ns.n):void");
}
public final void p(Exception exc) {
s(0, os.a.INTERNAL_ERROR, j2.n.f(exc));
}
public final void r() {
synchronized (this.k) {
try {
this.i.connectionPreface();
os.i iVar = new os.i();
iVar.b(7, this.f);
this.i.r0(iVar);
if (this.f > 65535) {
this.i.windowUpdate(0, r1 - 65535);
}
} catch (Throwable th) {
throw th;
}
}
}
public final void s(int i, os.a aVar, j2 j2Var) {
synchronized (this.k) {
try {
if (this.v == null) {
this.v = j2Var;
this.h.b(j2Var);
}
if (aVar != null && !this.w) {
this.w = true;
this.i.h(aVar, new byte[0]);
}
Iterator it = this.n.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
if (((Integer) entry.getKey()).intValue() > i) {
it.remove();
((n) entry.getValue()).m.j(j2Var, o0.REFUSED, false, new j1());
o((n) entry.getValue());
}
}
for (n nVar : this.E) {
nVar.m.j(j2Var, o0.MISCARRIED, true, new j1());
o(nVar);
}
this.E.clear();
v();
} catch (Throwable th) {
throw th;
}
}
}
public final boolean t() {
boolean z = false;
while (true) {
LinkedList linkedList = this.E;
if (linkedList.isEmpty() || this.n.size() >= this.D) {
break;
}
u((n) linkedList.poll());
z = true;
}
return z;
}
public final String toString() {
l.a b2 = mj.l.b(this);
b2.a(this.l.c, "logId");
b2.b(this.a, "address");
return b2.toString();
}
public final void u(n nVar) {
mj.q.l(nVar.m.L == -1, "StreamId already assigned");
this.n.put(Integer.valueOf(this.m), nVar);
if (!this.z) {
this.z = true;
g4 g4Var = this.G;
if (g4Var != null) {
g4Var.b();
}
}
if (nVar.d) {
this.P.c(nVar, true);
}
n.b bVar = nVar.m;
int i = this.m;
mj.q.m(bVar.L == -1, "the stream has been started with id %s", i);
bVar.L = i;
d0 d0Var = bVar.G;
bVar.K = d0Var.new a(i, d0Var.c, bVar);
n.b bVar2 = n.this.m;
mj.q.k(bVar2.k != null);
synchronized (bVar2.b) {
mj.q.l(!bVar2.f, "Already allocated");
bVar2.f = true;
}
bVar2.g();
i8 i8Var = bVar2.c;
i8Var.getClass();
i8Var.a.a();
if (bVar.I) {
bVar.F.v(n.this.p, bVar.L, bVar.y);
for (l2 l2Var : n.this.k.a) {
((ms.o) l2Var).n();
}
bVar.y = null;
py.e eVar = bVar.z;
if (eVar.b > 0) {
bVar.G.a(bVar.A, bVar.K, eVar, bVar.B);
}
bVar.I = false;
}
o1.b bVar3 = nVar.i.a;
if ((bVar3 != o1.b.UNARY && bVar3 != o1.b.SERVER_STREAMING) || nVar.p) {
this.i.flush();
}
int i2 = this.m;
if (i2 < 2147483645) {
this.m = i2 + 2;
} else {
this.m = Log.LOG_LEVEL_OFF;
s(Log.LOG_LEVEL_OFF, os.a.NO_ERROR, j2.n.g("Stream ids exhausted"));
}
}
public final void v() {
if (this.v == null || !this.n.isEmpty() || !this.E.isEmpty() || this.y) {
return;
}
this.y = true;
g4 g4Var = this.G;
if (g4Var != null) {
synchronized (g4Var) {
try {
g4.d dVar = g4Var.e;
g4.d dVar2 = g4.d.DISCONNECTED;
if (dVar != dVar2) {
g4Var.e = dVar2;
ScheduledFuture scheduledFuture = g4Var.f;
if (scheduledFuture != null) {
scheduledFuture.cancel(false);
}
ScheduledFuture scheduledFuture2 = g4Var.g;
if (scheduledFuture2 != null) {
scheduledFuture2.cancel(false);
g4Var.g = null;
}
}
} finally {
}
}
}
n3 n3Var = this.x;
if (n3Var != null) {
StatusException m = m();
synchronized (n3Var) {
try {
if (!n3Var.d) {
n3Var.d = true;
n3Var.e = m;
LinkedHashMap linkedHashMap = n3Var.c;
n3Var.c = null;
for (Map.Entry entry : linkedHashMap.entrySet()) {
try {
((Executor) entry.getValue()).execute(new m3((q0) entry.getKey(), m));
} catch (Throwable th) {
n3.g.log(Level.SEVERE, "Failed to execute PingCallback", th);
}
}
}
} finally {
}
}
this.x = null;
}
if (!this.w) {
this.w = true;
this.i.h(os.a.NO_ERROR, new byte[0]);
}
this.i.close();
}
private o(j.e eVar, InetSocketAddress inetSocketAddress, String str, String str2, ms.b bVar, mj.c0 c0Var, os.j jVar, m0 m0Var, Runnable runnable) {
this.d = new Random();
Object obj = new Object();
this.k = obj;
this.n = new HashMap();
this.D = 0;
this.E = new LinkedList();
this.P = new a();
this.R = 30000;
mj.q.h(inetSocketAddress, "address");
this.a = inetSocketAddress;
this.b = str;
this.r = eVar.j;
this.f = eVar.n;
Executor executor = eVar.b;
mj.q.h(executor, "executor");
this.o = executor;
this.p = new t7(eVar.b);
ScheduledExecutorService scheduledExecutorService = eVar.d;
mj.q.h(scheduledExecutorService, "scheduledExecutorService");
this.q = scheduledExecutorService;
this.m = 3;
SocketFactory socketFactory = eVar.f;
this.A = socketFactory == null ? SocketFactory.getDefault() : socketFactory;
this.B = eVar.g;
this.C = eVar.h;
io.grpc.okhttp.internal.c cVar = eVar.i;
mj.q.h(cVar, "connectionSpec");
this.F = cVar;
mj.q.h(c0Var, "stopwatchFactory");
this.e = c0Var;
mj.q.h(jVar, "variant");
this.g = jVar;
Logger logger = f3.a;
StringBuilder sb = new StringBuilder();
if (str2 != null) {
sb.append(str2);
sb.append(' ');
}
sb.append("grpc-java-okhttp/1.70.0");
this.c = sb.toString();
this.Q = m0Var;
mj.q.h(runnable, "tooManyPingsRunnable");
this.L = runnable;
this.M = eVar.p;
i8.a aVar = eVar.e;
aVar.getClass();
this.O = new i8(aVar.a);
this.l = u0.a(getClass(), inetSocketAddress.toString());
b.a aVar2 = new b.a();
aVar2.b(e3.b, bVar);
this.u = aVar2.a();
this.N = eVar.q;
synchronized (obj) {
new p(this);
}
}
public o(j.e eVar, String str, mj.c0 c0Var, os.j jVar, Runnable runnable, sj.a0 a0Var, Runnable runnable2) {
this(eVar, new InetSocketAddress("127.0.0.1", 80), "notarealauthority:80", str, ms.b.b, c0Var, jVar, null, runnable2);
this.S = runnable;
mj.q.h(a0Var, "connectedFuture");
this.T = a0Var;
}
}