Package io.grpc.alts
Class AltsContext
- java.lang.Object
-
- io.grpc.alts.AltsContext
-
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/7864") public final class AltsContext extends ObjectAltsContextcontains security-related information on the ALTS channel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAltsContext.SecurityLevelSecurityLevel of the ALTS channel.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AltsContextcreateTestInstance(String peerServiceAccount, String localServiceAccount)Creates anAltsContextfor testing purposes.StringgetLocalServiceAccount()Get local service account.StringgetPeerServiceAccount()Get peer service account.AltsContext.SecurityLevelgetSecurityLevel()Get security level.
-
-
-
Method Detail
-
createTestInstance
public static AltsContext createTestInstance(String peerServiceAccount, String localServiceAccount)
Creates anAltsContextfor testing purposes.- Parameters:
peerServiceAccount- the peer service account of the to be createdAltsContextlocalServiceAccount- the local service account of the to be createdAltsContext- Returns:
- the created
AltsContext
-
getSecurityLevel
public AltsContext.SecurityLevel getSecurityLevel()
Get security level.- Returns:
- the context's security level.
-
getPeerServiceAccount
public String getPeerServiceAccount()
Get peer service account.- Returns:
- the context's peer service account.
-
getLocalServiceAccount
public String getLocalServiceAccount()
Get local service account.- Returns:
- the context's local service account.
-
-