Package io.grpc.alts
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 boolean
check
(io.grpc.ServerCall<?, ?> call) Checks if theServerCall
contains ALTS information.static AltsContext
createFrom
(io.grpc.ServerCall<?, ?> call) Creates aAltsContext
from ALTS context information in theServerCall
.
-
Constructor Details
-
AltsContextUtil
private AltsContextUtil()
-
-
Method Details
-
createFrom
Creates aAltsContext
from ALTS context information in theServerCall
.- Parameters:
call
- theServerCall
containing the ALTS information- Returns:
- the created
AltsContext
- Throws:
IllegalArgumentException
- if theServerCall
has no ALTS information.
-
check
public static boolean check(io.grpc.ServerCall<?, ?> call) Checks if theServerCall
contains ALTS information.- Parameters:
call
- theServerCall
to check- Returns:
- true, if the
ServerCall
contains ALTS information and false otherwise.
-