Package io.grpc.alts

Class AltsContextUtil


  • @ExperimentalApi("https://github.com/grpc/grpc-java/issues/7864")
    public final class AltsContextUtil
    extends java.lang.Object
    Utility class for AltsContext.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AltsContextUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean check​(io.grpc.ServerCall<?,​?> call)
      Checks if the ServerCall contains ALTS information.
      static AltsContext createFrom​(io.grpc.ServerCall<?,​?> call)
      Creates a AltsContext from ALTS context information in the ServerCall.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AltsContextUtil

        private AltsContextUtil()
    • Method Detail

      • createFrom

        public static AltsContext createFrom​(io.grpc.ServerCall<?,​?> call)
        Creates a AltsContext from ALTS context information in the ServerCall.
        Parameters:
        call - the ServerCall containing the ALTS information
        Returns:
        the created AltsContext
        Throws:
        java.lang.IllegalArgumentException - if the ServerCall has no ALTS information.
      • check

        public static boolean check​(io.grpc.ServerCall<?,​?> call)
        Checks if the ServerCall contains ALTS information.
        Parameters:
        call - the ServerCall to check
        Returns:
        true, if the ServerCall contains ALTS information and false otherwise.