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 Object
implements io.grpc.netty.InternalProtocolNegotiator.ClientFactory
A Protocol Negotiator factory which can switch between ALTS and TLS based on EAG Attrs.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGoogleDefaultProtocolNegotiatorFactory
(List<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
Modifier and TypeMethodDescriptionint
private static io.grpc.Attributes.Key
<String> io.grpc.netty.InternalProtocolNegotiator.ProtocolNegotiator
-
Field Details
-
clusterNameAttrKey
-
targetServiceAccounts
-
handshakerChannelPool
private final io.grpc.internal.ObjectPool<io.grpc.Channel> handshakerChannelPool -
sslContext
private final io.netty.handler.ssl.SslContext sslContext
-
-
Constructor Details
-
GoogleDefaultProtocolNegotiatorFactory
public GoogleDefaultProtocolNegotiatorFactory(List<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 Details
-
newNegotiator
public io.grpc.netty.InternalProtocolNegotiator.ProtocolNegotiator newNegotiator()- Specified by:
newNegotiator
in interfaceio.grpc.netty.InternalProtocolNegotiator.ClientFactory
- Specified by:
newNegotiator
in interfaceio.grpc.netty.ProtocolNegotiator.ClientFactory
-
getDefaultPort
public int getDefaultPort()- Specified by:
getDefaultPort
in interfaceio.grpc.netty.ProtocolNegotiator.ClientFactory
-
loadClusterNameAttrKey
-