Class 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.

    • 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's Value representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EnvoyProtoData

        private EnvoyProtoData()
    • Method Detail

      • convertToValue

        private static com.google.protobuf.Value convertToValue​(java.lang.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.