Package io.grpc
Class ChoiceServerCredentials
- java.lang.Object
-
- io.grpc.ServerCredentials
-
- io.grpc.ChoiceServerCredentials
-
public final class ChoiceServerCredentials extends ServerCredentials
Provides a list ofServerCredentials
, where any one may be used. The credentials are in preference order.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ServerCredentials
create(ServerCredentials... creds)
Constructs with the providedcreds
as options, with preferred credentials first.List<ServerCredentials>
getCredentialsList()
Non-empty list of credentials, in preference order.
-
-
-
Method Detail
-
create
public static ServerCredentials create(ServerCredentials... creds)
Constructs with the providedcreds
as options, with preferred credentials first.- Throws:
IllegalArgumentException
- if no creds are provided
-
getCredentialsList
public List<ServerCredentials> getCredentialsList()
Non-empty list of credentials, in preference order.
-
-