Class AltsContextUtil
java.lang.Object
io.grpc.alts.AltsContextUtil
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/7864")
public final class AltsContextUtil
extends Object
Utility class for
AltsContext.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheck(io.grpc.ServerCall<?, ?> call) Checks if theServerCallcontains ALTS information.static AltsContextcreateFrom(io.grpc.ServerCall<?, ?> call) Creates aAltsContextfrom ALTS context information in theServerCall.
-
Constructor Details
-
AltsContextUtil
private AltsContextUtil()
-
-
Method Details
-
createFrom
Creates aAltsContextfrom ALTS context information in theServerCall.- Parameters:
call- theServerCallcontaining the ALTS information- Returns:
- the created
AltsContext - Throws:
IllegalArgumentException- if theServerCallhas no ALTS information.
-
check
public static boolean check(io.grpc.ServerCall<?, ?> call) Checks if theServerCallcontains ALTS information.- Parameters:
call- theServerCallto check- Returns:
- true, if the
ServerCallcontains ALTS information and false otherwise.
-