Package io.grpc.alts

Class 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.
    • Method Detail

      • createTestInstance

        public static AltsContext createTestInstance​(java.lang.String peerServiceAccount,
                                                     java.lang.String localServiceAccount)
        Creates an AltsContext for testing purposes.
        Parameters:
        peerServiceAccount - the peer service account of the to be created AltsContext
        localServiceAccount - the local service account of the to be created AltsContext
        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.