alexandroid/decompiled/jadx/sources/org/apache/http/config/SocketConfig.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

153 lines
4.7 KiB
Java

package org.apache.http.config;
import com.amazon.alexa.ra.core.ui.markdown.parser.formatter.MarkdownConstants;
import defpackage.a$$ExternalSyntheticOutline0;
import org.apache.http.annotation.Contract;
import org.apache.http.annotation.ThreadingBehavior;
import org.apache.http.util.Args;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Contract(threading = ThreadingBehavior.IMMUTABLE)
/* loaded from: classes11.dex */
public class SocketConfig implements Cloneable {
public static final SocketConfig DEFAULT = new Builder().build();
private final int backlogSize;
private final int rcvBufSize;
private final int sndBufSize;
private final boolean soKeepAlive;
private final int soLinger;
private final boolean soReuseAddress;
private final int soTimeout;
private final boolean tcpNoDelay;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class Builder {
private int backlogSize;
private int rcvBufSize;
private int sndBufSize;
private boolean soKeepAlive;
private boolean soReuseAddress;
private int soTimeout;
private int soLinger = -1;
private boolean tcpNoDelay = true;
public SocketConfig build() {
return new SocketConfig(this.soTimeout, this.soReuseAddress, this.soLinger, this.soKeepAlive, this.tcpNoDelay, this.sndBufSize, this.rcvBufSize, this.backlogSize);
}
public Builder setBacklogSize(int i) {
this.backlogSize = i;
return this;
}
public Builder setRcvBufSize(int i) {
this.rcvBufSize = i;
return this;
}
public Builder setSndBufSize(int i) {
this.sndBufSize = i;
return this;
}
public Builder setSoKeepAlive(boolean z) {
this.soKeepAlive = z;
return this;
}
public Builder setSoLinger(int i) {
this.soLinger = i;
return this;
}
public Builder setSoReuseAddress(boolean z) {
this.soReuseAddress = z;
return this;
}
public Builder setSoTimeout(int i) {
this.soTimeout = i;
return this;
}
public Builder setTcpNoDelay(boolean z) {
this.tcpNoDelay = z;
return this;
}
}
public SocketConfig(int i, boolean z, int i2, boolean z2, boolean z3, int i3, int i4, int i5) {
this.soTimeout = i;
this.soReuseAddress = z;
this.soLinger = i2;
this.soKeepAlive = z2;
this.tcpNoDelay = z3;
this.sndBufSize = i3;
this.rcvBufSize = i4;
this.backlogSize = i5;
}
public static Builder copy(SocketConfig socketConfig) {
Args.notNull(socketConfig, "Socket config");
return new Builder().setSoTimeout(socketConfig.getSoTimeout()).setSoReuseAddress(socketConfig.isSoReuseAddress()).setSoLinger(socketConfig.getSoLinger()).setSoKeepAlive(socketConfig.isSoKeepAlive()).setTcpNoDelay(socketConfig.isTcpNoDelay()).setSndBufSize(socketConfig.getSndBufSize()).setRcvBufSize(socketConfig.getRcvBufSize()).setBacklogSize(socketConfig.getBacklogSize());
}
public static Builder custom() {
return new Builder();
}
public SocketConfig clone() throws CloneNotSupportedException {
return (SocketConfig) super.clone();
}
public int getBacklogSize() {
return this.backlogSize;
}
public int getRcvBufSize() {
return this.rcvBufSize;
}
public int getSndBufSize() {
return this.sndBufSize;
}
public int getSoLinger() {
return this.soLinger;
}
public int getSoTimeout() {
return this.soTimeout;
}
public boolean isSoKeepAlive() {
return this.soKeepAlive;
}
public boolean isSoReuseAddress() {
return this.soReuseAddress;
}
public boolean isTcpNoDelay() {
return this.tcpNoDelay;
}
public String toString() {
StringBuilder sb = new StringBuilder("[soTimeout=");
sb.append(this.soTimeout);
sb.append(", soReuseAddress=");
sb.append(this.soReuseAddress);
sb.append(", soLinger=");
sb.append(this.soLinger);
sb.append(", soKeepAlive=");
sb.append(this.soKeepAlive);
sb.append(", tcpNoDelay=");
sb.append(this.tcpNoDelay);
sb.append(", sndBufSize=");
sb.append(this.sndBufSize);
sb.append(", rcvBufSize=");
sb.append(this.rcvBufSize);
sb.append(", backlogSize=");
return a$$ExternalSyntheticOutline0.m(sb, this.backlogSize, MarkdownConstants.RIGHT_BRACKET);
}
}