Package io.grpc.xds.client
Class EnvoyProtoData
- java.lang.Object
-
- io.grpc.xds.client.EnvoyProtoData
-
@Internal public final class EnvoyProtoData extends java.lang.Object
Defines 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
fromEnvoyProtoXXX
static 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
toEnvoyProtoXXX
instance 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 class
EnvoyProtoData.Address
See corresponding Envoy proto messageAddress
.static class
EnvoyProtoData.Node
See corresponding Envoy proto messageNode
.
-
Constructor Summary
Constructors Modifier Constructor Description private
EnvoyProtoData()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static com.google.protobuf.Value
convertToValue(java.lang.Object rawObject)
Converts Java representation of the given JSON value to protobuf'sValue
representation.
-
-
-
Method Detail
-
convertToValue
private static com.google.protobuf.Value convertToValue(java.lang.Object rawObject)
Converts Java representation of the given JSON value to protobuf'sValue
representation.The given
rawObject
must be a valid JSON value in Java representation, which is either aMap<String, ?>
,List<?>
,String
,Double
,Boolean
, ornull
.
-
-