Package io.grpc.alts
Class AltsChannelBuilder
java.lang.Object
io.grpc.ManagedChannelBuilder<AltsChannelBuilder>
io.grpc.ForwardingChannelBuilder2<AltsChannelBuilder>
io.grpc.alts.AltsChannelBuilder
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4151")
public final class AltsChannelBuilder
extends io.grpc.ForwardingChannelBuilder2<AltsChannelBuilder>
ALTS version of
ManagedChannelBuilder
. This class sets up a secure and authenticated
communication between two cloud VMs using ALTS.-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.ManagedChannelBuilder
io.grpc.ManagedChannelBuilder.InterceptorFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AltsChannelCredentials.Builder
private final io.grpc.netty.NettyChannelBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddTargetServiceAccount
(String targetServiceAccount) Adds an expected target service accounts.io.grpc.ManagedChannel
build()
protected io.grpc.netty.NettyChannelBuilder
delegate()
Enables untrusted ALTS for testing.static AltsChannelBuilder
forAddress
(String name, int port) "Overrides" the static method inManagedChannelBuilder
.static AltsChannelBuilder
"Overrides" the static method inManagedChannelBuilder
.(package private) io.grpc.netty.InternalProtocolNegotiator.ProtocolNegotiator
setHandshakerAddressForTesting
(String handshakerAddress) Sets a new handshaker service address for testing.Methods inherited from class io.grpc.ForwardingChannelBuilder2
addMetricSink, addTransportFilter, compressorRegistry, decompressorRegistry, defaultLoadBalancingPolicy, defaultServiceConfig, directExecutor, disableRetry, disableServiceConfigLookUp, enableRetry, executor, idleTimeout, intercept, intercept, interceptWithTarget, keepAliveTime, keepAliveTimeout, keepAliveWithoutCalls, maxHedgedAttempts, maxInboundMessageSize, maxInboundMetadataSize, maxRetryAttempts, maxTraceEvents, nameResolverFactory, offloadExecutor, overrideAuthority, perRpcBufferLimit, proxyDetector, retryBufferSize, setBinaryLog, toString, usePlaintext, userAgent, useTransportSecurity
-
Field Details
-
delegate
private final io.grpc.netty.NettyChannelBuilder delegate -
credentialsBuilder
-
-
Constructor Details
-
AltsChannelBuilder
-
-
Method Details
-
forTarget
"Overrides" the static method inManagedChannelBuilder
. -
forAddress
"Overrides" the static method inManagedChannelBuilder
. -
addTargetServiceAccount
Adds an expected target service accounts. One of the added service accounts should match peer service account in the handshaker result. Otherwise, the handshake fails. -
enableUntrustedAltsForTesting
Enables untrusted ALTS for testing. If this function is called, we will not check whether ALTS is running on Google Cloud Platform. -
setHandshakerAddressForTesting
Sets a new handshaker service address for testing. -
delegate
protected io.grpc.netty.NettyChannelBuilder delegate()- Specified by:
delegate
in classio.grpc.ForwardingChannelBuilder2<AltsChannelBuilder>
-
build
public io.grpc.ManagedChannel build()- Overrides:
build
in classio.grpc.ForwardingChannelBuilder2<AltsChannelBuilder>
-
getProtocolNegotiatorForTest
@Nullable io.grpc.netty.InternalProtocolNegotiator.ProtocolNegotiator getProtocolNegotiatorForTest()
-