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 ObjectUtility class forAltsContext.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheck(io.grpc.Attributes attributes)Checks if theAttributescontains ALTS information.static booleancheck(io.grpc.ClientCall<?,?> call)Checks if theClientCallcontains ALTS information.static booleancheck(io.grpc.ServerCall<?,?> call)Checks if theServerCallcontains ALTS information.static AltsContextcreateFrom(io.grpc.Attributes attributes)Creates anAltsContextfrom ALTS context information in theAttributes.static AltsContextcreateFrom(io.grpc.ClientCall<?,?> call)Creates anAltsContextfrom ALTS context information in theClientCall.static AltsContextcreateFrom(io.grpc.ServerCall<?,?> call)Creates anAltsContextfrom ALTS context information in theServerCall.
-
-
-
Method Detail
-
createFrom
public static AltsContext createFrom(io.grpc.ServerCall<?,?> call)
Creates anAltsContextfrom ALTS context information in theServerCall.- Parameters:
call- theServerCallcontaining the ALTS information- Returns:
- the created
AltsContext - Throws:
IllegalArgumentException- if theServerCallhas no ALTS information.
-
createFrom
public static AltsContext createFrom(io.grpc.ClientCall<?,?> call)
Creates anAltsContextfrom ALTS context information in theClientCall.- Parameters:
call- theClientCallcontaining the ALTS information- Returns:
- the created
AltsContext - Throws:
IllegalArgumentException- if theClientCallhas no ALTS information.
-
createFrom
public static AltsContext createFrom(io.grpc.Attributes attributes)
Creates anAltsContextfrom ALTS context information in theAttributes.- Parameters:
attributes- theAttributescontaining the ALTS information- Returns:
- the created
AltsContext - Throws:
IllegalArgumentException- if theAttributeshas 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.
-
check
public static boolean check(io.grpc.ClientCall<?,?> call)
Checks if theClientCallcontains ALTS information.- Parameters:
call- theClientCallto check- Returns:
- true, if the
ClientCallcontains ALTS information and false otherwise.
-
check
public static boolean check(io.grpc.Attributes attributes)
Checks if theAttributescontains ALTS information.- Parameters:
attributes- theAttributesto check- Returns:
- true, if the
Attributescontains ALTS information and false otherwise.
-
-