Package io.grpc.alts.internal
Class AltsProtocolNegotiator.GoogleDefaultProtocolNegotiatorFactory
- java.lang.Object
-
- io.grpc.alts.internal.AltsProtocolNegotiator.GoogleDefaultProtocolNegotiatorFactory
-
- All Implemented Interfaces:
io.grpc.netty.InternalProtocolNegotiator.ClientFactory,io.grpc.netty.ProtocolNegotiator.ClientFactory
- Enclosing class:
- AltsProtocolNegotiator
public static final class AltsProtocolNegotiator.GoogleDefaultProtocolNegotiatorFactory extends java.lang.Object implements io.grpc.netty.InternalProtocolNegotiator.ClientFactoryA Protocol Negotiator factory which can switch between ALTS and TLS based on EAG Attrs.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static io.grpc.Attributes.Key<java.lang.String>clusterNameAttrKeyprivate io.grpc.internal.ObjectPool<io.grpc.Channel>handshakerChannelPoolprivate io.netty.handler.ssl.SslContextsslContextprivate com.google.common.collect.ImmutableList<java.lang.String>targetServiceAccounts
-
Constructor Summary
Constructors Constructor Description GoogleDefaultProtocolNegotiatorFactory(java.util.List<java.lang.String> targetServiceAccounts, io.grpc.internal.ObjectPool<io.grpc.Channel> handshakerChannelPool, io.netty.handler.ssl.SslContext sslContext)Creates Negotiator Factory, which will either use the targetServiceAccounts and handshakerChannelPool, or the sslContext.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDefaultPort()private static io.grpc.Attributes.Key<java.lang.String>loadClusterNameAttrKey()io.grpc.netty.InternalProtocolNegotiator.ProtocolNegotiatornewNegotiator()
-
-
-
Field Detail
-
clusterNameAttrKey
@Nullable static io.grpc.Attributes.Key<java.lang.String> clusterNameAttrKey
-
targetServiceAccounts
private final com.google.common.collect.ImmutableList<java.lang.String> targetServiceAccounts
-
handshakerChannelPool
private final io.grpc.internal.ObjectPool<io.grpc.Channel> handshakerChannelPool
-
sslContext
private final io.netty.handler.ssl.SslContext sslContext
-
-
Constructor Detail
-
GoogleDefaultProtocolNegotiatorFactory
public GoogleDefaultProtocolNegotiatorFactory(java.util.List<java.lang.String> targetServiceAccounts, io.grpc.internal.ObjectPool<io.grpc.Channel> handshakerChannelPool, io.netty.handler.ssl.SslContext sslContext)Creates Negotiator Factory, which will either use the targetServiceAccounts and handshakerChannelPool, or the sslContext.
-
-
Method Detail
-
newNegotiator
public io.grpc.netty.InternalProtocolNegotiator.ProtocolNegotiator newNegotiator()
- Specified by:
newNegotiatorin interfaceio.grpc.netty.InternalProtocolNegotiator.ClientFactory- Specified by:
newNegotiatorin interfaceio.grpc.netty.ProtocolNegotiator.ClientFactory
-
getDefaultPort
public int getDefaultPort()
- Specified by:
getDefaultPortin interfaceio.grpc.netty.ProtocolNegotiator.ClientFactory
-
loadClusterNameAttrKey
@Nullable private static io.grpc.Attributes.Key<java.lang.String> loadClusterNameAttrKey()
-
-