Package io.grpc.alts
Class AltsChannelCredentials.Builder
- java.lang.Object
-
- io.grpc.alts.AltsChannelCredentials.Builder
-
- Enclosing class:
- AltsChannelCredentials
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4151") public static final class AltsChannelCredentials.Builder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
enableUntrustedAlts
private io.grpc.internal.ObjectPool<io.grpc.Channel>
handshakerChannelPool
private com.google.common.collect.ImmutableList.Builder<java.lang.String>
targetServiceAccountsBuilder
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AltsChannelCredentials.Builder
addTargetServiceAccount(java.lang.String targetServiceAccount)
Adds an expected target service accounts.io.grpc.ChannelCredentials
build()
(package private) io.grpc.netty.InternalProtocolNegotiator.ClientFactory
buildProtocolNegotiatorFactory()
AltsChannelCredentials.Builder
enableUntrustedAltsForTesting()
Enables untrusted ALTS for testing.AltsChannelCredentials.Builder
setHandshakerAddressForTesting(java.lang.String handshakerAddress)
Sets a new handshaker service address for testing.
-
-
-
Field Detail
-
targetServiceAccountsBuilder
private final com.google.common.collect.ImmutableList.Builder<java.lang.String> targetServiceAccountsBuilder
-
handshakerChannelPool
private io.grpc.internal.ObjectPool<io.grpc.Channel> handshakerChannelPool
-
enableUntrustedAlts
private boolean enableUntrustedAlts
-
-
Method Detail
-
addTargetServiceAccount
public AltsChannelCredentials.Builder addTargetServiceAccount(java.lang.String targetServiceAccount)
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
public AltsChannelCredentials.Builder enableUntrustedAltsForTesting()
Enables untrusted ALTS for testing. If this function is called, we will not check whether ALTS is running on Google Cloud Platform.
-
setHandshakerAddressForTesting
public AltsChannelCredentials.Builder setHandshakerAddressForTesting(java.lang.String handshakerAddress)
Sets a new handshaker service address for testing.
-
build
public io.grpc.ChannelCredentials build()
-
buildProtocolNegotiatorFactory
io.grpc.netty.InternalProtocolNegotiator.ClientFactory buildProtocolNegotiatorFactory()
-
-