Class EnvoyProtoData

java.lang.Object
io.grpc.xds.client.EnvoyProtoData

@Internal public final class EnvoyProtoData extends 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.

  • Constructor Details

    • EnvoyProtoData

      private EnvoyProtoData()
  • Method Details

    • convertToValue

      private static com.google.protobuf.Value convertToValue(Object rawObject)
      Converts Java representation of the given JSON value to protobuf's Value representation.

      The given rawObject must be a valid JSON value in Java representation, which is either a Map<String, ?>, List<?>, String, Double, Boolean, or null.