package io.grpc.internal; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import io.grpc.Attributes; import io.grpc.CallCredentials; import io.grpc.ChannelCredentials; import io.grpc.ChannelLogger; import io.grpc.HttpConnectProxiedSocketAddress; import java.io.Closeable; import java.net.SocketAddress; import java.util.concurrent.ScheduledExecutorService; /* loaded from: classes6.dex */ public interface ClientTransportFactory extends Closeable { @Override // java.io.Closeable, java.lang.AutoCloseable void close(); ScheduledExecutorService getScheduledExecutorService(); ConnectionClientTransport newClientTransport(SocketAddress socketAddress, ClientTransportOptions clientTransportOptions, ChannelLogger channelLogger); SwapChannelCredentialsResult swapChannelCredentials(ChannelCredentials channelCredentials); /* loaded from: classes6.dex */ public static final class ClientTransportOptions { private ChannelLogger channelLogger; private HttpConnectProxiedSocketAddress connectProxiedSocketAddr; private String userAgent; private String authority = "unknown-authority"; private Attributes eagAttributes = Attributes.EMPTY; public final ClientTransportOptions setAuthority(String str) { this.authority = (String) Preconditions.checkNotNull(str, "authority"); return this; } public final ClientTransportOptions setEagAttributes(Attributes attributes) { Preconditions.checkNotNull(attributes, "eagAttributes"); this.eagAttributes = attributes; return this; } public final int hashCode() { return Objects.hashCode(this.authority, this.eagAttributes, this.userAgent, this.connectProxiedSocketAddr); } public final boolean equals(Object obj) { if (!(obj instanceof ClientTransportOptions)) { return false; } ClientTransportOptions clientTransportOptions = (ClientTransportOptions) obj; return this.authority.equals(clientTransportOptions.authority) && this.eagAttributes.equals(clientTransportOptions.eagAttributes) && Objects.equal(this.userAgent, clientTransportOptions.userAgent) && Objects.equal(this.connectProxiedSocketAddr, clientTransportOptions.connectProxiedSocketAddr); } public final ClientTransportOptions setUserAgent(String str) { this.userAgent = str; return this; } public final ClientTransportOptions setHttpConnectProxiedSocketAddress(HttpConnectProxiedSocketAddress httpConnectProxiedSocketAddress) { this.connectProxiedSocketAddr = httpConnectProxiedSocketAddress; return this; } public final ClientTransportOptions setChannelLogger(ChannelLogger channelLogger) { this.channelLogger = channelLogger; return this; } public final String getUserAgent() { return this.userAgent; } public final HttpConnectProxiedSocketAddress getHttpConnectProxiedSocketAddress() { return this.connectProxiedSocketAddr; } public final Attributes getEagAttributes() { return this.eagAttributes; } public final ChannelLogger getChannelLogger() { return this.channelLogger; } public final String getAuthority() { return this.authority; } } /* loaded from: classes6.dex */ public static final class SwapChannelCredentialsResult { final CallCredentials callCredentials; final ClientTransportFactory transportFactory; public SwapChannelCredentialsResult(ClientTransportFactory clientTransportFactory, CallCredentials callCredentials) { this.transportFactory = (ClientTransportFactory) Preconditions.checkNotNull(clientTransportFactory, "transportFactory"); this.callCredentials = callCredentials; } } }