Package io.grpc.xds.internal
Class TlsXdsCredentialsProvider
- java.lang.Object
-
- io.grpc.xds.XdsCredentialsProvider
-
- io.grpc.xds.internal.TlsXdsCredentialsProvider
-
public final class TlsXdsCredentialsProvider extends XdsCredentialsProvider
A wrapper class that supportsTlsChannelCredentialsfor Xds by implementingXdsCredentialsProvider.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringCREDS_NAME
-
Constructor Summary
Constructors Constructor Description TlsXdsCredentialsProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetName()Returns the xDS credential name associated with this provider which makes it selectable viaXdsCredentialsRegistry.getProvider(java.lang.String).booleanisAvailable()Whether this provider is available for use, taking the current environment into consideration.protected io.grpc.ChannelCredentialsnewChannelCredentials(java.util.Map<java.lang.String,?> jsonConfig)Creates aChannelCredentialsfrom the given jsonConfig, ornullif the given config is invalid.intpriority()A priority, from 0 to 10 that this provider should be used, taking the current environment into consideration.
-
-
-
Field Detail
-
CREDS_NAME
private static final java.lang.String CREDS_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
newChannelCredentials
protected io.grpc.ChannelCredentials newChannelCredentials(java.util.Map<java.lang.String,?> jsonConfig)
Description copied from class:XdsCredentialsProviderCreates aChannelCredentialsfrom the given jsonConfig, ornullif the given config is invalid. The provider is free to ignore the config if it's not needed for producing the channel credentials.- Specified by:
newChannelCredentialsin classXdsCredentialsProvider- Parameters:
jsonConfig- json config that can be consumed by the provider to create the channel credentials
-
getName
protected java.lang.String getName()
Description copied from class:XdsCredentialsProviderReturns the xDS credential name associated with this provider which makes it selectable viaXdsCredentialsRegistry.getProvider(java.lang.String). This is called only when the class is loaded. It shouldn't change, and there is no point doing so.- Specified by:
getNamein classXdsCredentialsProvider
-
isAvailable
public boolean isAvailable()
Description copied from class:XdsCredentialsProviderWhether this provider is available for use, taking the current environment into consideration. Iffalse,XdsCredentialsProvider.newChannelCredentials(java.util.Map<java.lang.String, ?>)is not safe to be called.- Specified by:
isAvailablein classXdsCredentialsProvider
-
priority
public int priority()
Description copied from class:XdsCredentialsProviderA priority, from 0 to 10 that this provider should be used, taking the current environment into consideration. 5 should be considered the default, and then tweaked based on environment detection. A priority of 0 does not imply that the provider wouldn't work; just that it should be last in line.- Specified by:
priorityin classXdsCredentialsProvider
-
-