63 lines
2.2 KiB
Java
63 lines
2.2 KiB
Java
|
package io.grpc.internal;
|
||
|
|
||
|
import com.google.common.base.Objects;
|
||
|
import com.google.common.base.Preconditions;
|
||
|
import io.grpc.CallOptions;
|
||
|
import io.grpc.LoadBalancer;
|
||
|
import io.grpc.Metadata;
|
||
|
import io.grpc.MethodDescriptor;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public final class PickSubchannelArgsImpl extends LoadBalancer.PickSubchannelArgs {
|
||
|
private final CallOptions callOptions;
|
||
|
private final Metadata headers;
|
||
|
private final MethodDescriptor<?, ?> method;
|
||
|
|
||
|
public PickSubchannelArgsImpl(MethodDescriptor<?, ?> methodDescriptor, Metadata metadata, CallOptions callOptions) {
|
||
|
this.method = (MethodDescriptor) Preconditions.checkNotNull(methodDescriptor, "method");
|
||
|
this.headers = (Metadata) Preconditions.checkNotNull(metadata, "headers");
|
||
|
this.callOptions = (CallOptions) Preconditions.checkNotNull(callOptions, "callOptions");
|
||
|
}
|
||
|
|
||
|
public final boolean equals(Object obj) {
|
||
|
if (this == obj) {
|
||
|
return true;
|
||
|
}
|
||
|
if (obj == null || getClass() != obj.getClass()) {
|
||
|
return false;
|
||
|
}
|
||
|
PickSubchannelArgsImpl pickSubchannelArgsImpl = (PickSubchannelArgsImpl) obj;
|
||
|
return Objects.equal(this.callOptions, pickSubchannelArgsImpl.callOptions) && Objects.equal(this.headers, pickSubchannelArgsImpl.headers) && Objects.equal(this.method, pickSubchannelArgsImpl.method);
|
||
|
}
|
||
|
|
||
|
public final int hashCode() {
|
||
|
return Objects.hashCode(this.callOptions, this.headers, this.method);
|
||
|
}
|
||
|
|
||
|
public final String toString() {
|
||
|
StringBuilder sb = new StringBuilder("[method=");
|
||
|
sb.append(this.method);
|
||
|
sb.append(" headers=");
|
||
|
sb.append(this.headers);
|
||
|
sb.append(" callOptions=");
|
||
|
sb.append(this.callOptions);
|
||
|
sb.append("]");
|
||
|
return sb.toString();
|
||
|
}
|
||
|
|
||
|
@Override // io.grpc.LoadBalancer.PickSubchannelArgs
|
||
|
public final MethodDescriptor<?, ?> getMethodDescriptor() {
|
||
|
return this.method;
|
||
|
}
|
||
|
|
||
|
@Override // io.grpc.LoadBalancer.PickSubchannelArgs
|
||
|
public final Metadata getHeaders() {
|
||
|
return this.headers;
|
||
|
}
|
||
|
|
||
|
@Override // io.grpc.LoadBalancer.PickSubchannelArgs
|
||
|
public final CallOptions getCallOptions() {
|
||
|
return this.callOptions;
|
||
|
}
|
||
|
}
|