56 lines
1.6 KiB
Java
56 lines
1.6 KiB
Java
|
package okhttp3.repackaged;
|
||
|
|
||
|
import java.net.InetSocketAddress;
|
||
|
import java.net.Proxy;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public final class Route {
|
||
|
final Address address;
|
||
|
final InetSocketAddress inetSocketAddress;
|
||
|
final Proxy proxy;
|
||
|
|
||
|
public Route(Address address, Proxy proxy, InetSocketAddress inetSocketAddress) {
|
||
|
if (address == null) {
|
||
|
throw new NullPointerException("address == null");
|
||
|
}
|
||
|
if (proxy == null) {
|
||
|
throw new NullPointerException("proxy == null");
|
||
|
}
|
||
|
if (inetSocketAddress == null) {
|
||
|
throw new NullPointerException("inetSocketAddress == null");
|
||
|
}
|
||
|
this.address = address;
|
||
|
this.proxy = proxy;
|
||
|
this.inetSocketAddress = inetSocketAddress;
|
||
|
}
|
||
|
|
||
|
public final boolean requiresTunnel() {
|
||
|
return this.address.sslSocketFactory != null && this.proxy.type() == Proxy.Type.HTTP;
|
||
|
}
|
||
|
|
||
|
public final boolean equals(Object obj) {
|
||
|
if (!(obj instanceof Route)) {
|
||
|
return false;
|
||
|
}
|
||
|
Route route = (Route) obj;
|
||
|
return this.address.equals(route.address) && this.proxy.equals(route.proxy) && this.inetSocketAddress.equals(route.inetSocketAddress);
|
||
|
}
|
||
|
|
||
|
public final int hashCode() {
|
||
|
int hashCode = this.address.hashCode();
|
||
|
return ((((hashCode + 527) * 31) + this.proxy.hashCode()) * 31) + this.inetSocketAddress.hashCode();
|
||
|
}
|
||
|
|
||
|
public final InetSocketAddress socketAddress() {
|
||
|
return this.inetSocketAddress;
|
||
|
}
|
||
|
|
||
|
public final Proxy proxy() {
|
||
|
return this.proxy;
|
||
|
}
|
||
|
|
||
|
public final Address address() {
|
||
|
return this.address;
|
||
|
}
|
||
|
}
|