Top Description Fields Constructors Methods
io.grpc

public final Class ChoiceChannelCredentials

extends ChannelCredentials
Class Inheritance
Static Imports
java.util.Collections.unmodifiableList

Provides a list of ChannelCredentials, where any one may be used. The credentials are in preference order.

Field Summary

Modifier and TypeField and Description
private final List<ChannelCredentials>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ChannelCredentials
create(ChannelCredentials... creds)

Constructs with the provided creds as options, with preferred credentials first.

public List<ChannelCredentials>
getCredentialsList()

Non-empty list of credentials, in preference order.

public ChannelCredentials
withoutBearerTokens()

Implements abstract io.grpc.ChannelCredentials.withoutBearerTokens.

Returns the ChannelCredentials stripped of its CallCredentials.

Field Detail

credsback to summary
private final List<ChannelCredentials> creds

Constructor Detail

ChoiceChannelCredentialsback to summary
private ChoiceChannelCredentials(List<ChannelCredentials> creds)

Method Detail

createback to summary
public static ChannelCredentials create(ChannelCredentials... creds)

Constructs with the provided creds as options, with preferred credentials first.

Exceptions
IllegalArgumentException:
if no creds are provided
getCredentialsListback to summary
public List<ChannelCredentials> getCredentialsList()

Non-empty list of credentials, in preference order.

withoutBearerTokensback to summary
public ChannelCredentials withoutBearerTokens()

Implements abstract io.grpc.ChannelCredentials.withoutBearerTokens.

Doc from io.grpc.ChannelCredentials.withoutBearerTokens.

Returns the ChannelCredentials stripped of its CallCredentials. In the future, this may strip only some of the CallCredentials, preserving call credentials that are safe from replay attacks (e.g., if the token is bound to the channel's certificate).

Annotations
@Override