@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/7479") public final class TlsChannelCredentials extends ChannelCredentials
incomprehensible()
method. Unless overridden by a Feature
, server verification should
use customary default root certificates.Modifier and Type | Class and Description |
---|---|
static class |
TlsChannelCredentials.Builder
Builder for
TlsChannelCredentials . |
static class |
TlsChannelCredentials.Feature
Features to understand TLS configuration.
|
Modifier and Type | Method and Description |
---|---|
static ChannelCredentials |
create()
Use TLS with its defaults.
|
Set<TlsChannelCredentials.Feature> |
incomprehensible(Set<TlsChannelCredentials.Feature> understoodFeatures)
Returns an empty set if this credential can be adequately understood via
the features listed, otherwise returns a hint of features that are lacking
to understand the configuration to be used for manual debugging.
|
static TlsChannelCredentials.Builder |
newBuilder()
Creates a builder for changing default configuration.
|
ChannelCredentials |
withoutBearerTokens()
Returns the ChannelCredentials stripped of its CallCredentials.
|
public static ChannelCredentials create()
public Set<TlsChannelCredentials.Feature> incomprehensible(Set<TlsChannelCredentials.Feature> understoodFeatures)
An "understood" feature does not imply the caller is able to fully handle the feature. It simply means the caller understands the feature enough to use the appropriate APIs to read the configuration. The caller may support just a subset of a feature, in which case the caller would need to look at the configuration to determine if only the supported subset is used.
This method may not be as simple as a set difference. There may be multiple features that can independently satisfy a piece of configuration. If the configuration is incomprehensible, all such features would be returned, even though only one may be necessary.
An empty set does not imply that the credentials are fully understood. There may be optional configuration that can be ignored if not understood.
Since Feature
is an enum
, understoodFeatures
should generally be an EnumSet
. understoodFeatures
will not be modified.
understoodFeatures
- the features understood by the callerpublic ChannelCredentials withoutBearerTokens()
ChannelCredentials
withoutBearerTokens
in class ChannelCredentials
public static TlsChannelCredentials.Builder newBuilder()