Package io.grpc.xds.client
Class EnvoyProtoData
- java.lang.Object
-
- io.grpc.xds.client.EnvoyProtoData
-
@Internal public final class EnvoyProtoData extends java.lang.ObjectDefines gRPC data types for Envoy protobuf messages used in xDS protocol. Each data type has the same name as Envoy's corresponding protobuf message, but only with fields used by gRPC.Each data type should define a
fromEnvoyProtoXXXstatic method to convert an Envoy proto message to an instance of that data type.For data types that need to be sent as protobuf messages, a
toEnvoyProtoXXXinstance method is defined to convert an instance to Envoy proto message.Data conversion should follow the invariant: converted data is guaranteed to be valid for gRPC. If the protobuf message contains invalid data, the conversion should fail and no object should be instantiated.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classEnvoyProtoData.AddressSee corresponding Envoy proto messageAddress.static classEnvoyProtoData.NodeSee corresponding Envoy proto messageNode.
-
Constructor Summary
Constructors Modifier Constructor Description privateEnvoyProtoData()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static com.google.protobuf.ValueconvertToValue(java.lang.Object rawObject)Converts Java representation of the given JSON value to protobuf'sValuerepresentation.
-
-
-
Method Detail
-
convertToValue
private static com.google.protobuf.Value convertToValue(java.lang.Object rawObject)
Converts Java representation of the given JSON value to protobuf'sValuerepresentation.The given
rawObjectmust be a valid JSON value in Java representation, which is either aMap<String, ?>,List<?>,String,Double,Boolean, ornull.
-
-