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 java.lang.Object
AltsContext
contains security-related information on the ALTS channel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AltsContext.SecurityLevel
SecurityLevel of the ALTS channel.
-
Field Summary
Fields Modifier and Type Field Description private AltsInternalContext
wrapped
-
Constructor Summary
Constructors Constructor Description AltsContext(AltsInternalContext wrapped)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AltsContext
createTestInstance(java.lang.String peerServiceAccount, java.lang.String localServiceAccount)
Creates anAltsContext
for testing purposes.java.lang.String
getLocalServiceAccount()
Get local service account.java.lang.String
getPeerServiceAccount()
Get peer service account.AltsContext.SecurityLevel
getSecurityLevel()
Get security level.
-
-
-
Field Detail
-
wrapped
private final AltsInternalContext wrapped
-
-
Constructor Detail
-
AltsContext
AltsContext(AltsInternalContext wrapped)
-
-
Method Detail
-
createTestInstance
public static AltsContext createTestInstance(java.lang.String peerServiceAccount, java.lang.String localServiceAccount)
Creates anAltsContext
for testing purposes.- Parameters:
peerServiceAccount
- the peer service account of the to be createdAltsContext
localServiceAccount
- 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 java.lang.String getPeerServiceAccount()
Get peer service account.- Returns:
- the context's peer service account.
-
getLocalServiceAccount
public java.lang.String getLocalServiceAccount()
Get local service account.- Returns:
- the context's local service account.
-
-