Class ProtoLiteUtils.MetadataMarshaller<T extends com.google.protobuf.MessageLite>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private T defaultInstance  
    • Constructor Summary

      Constructors 
      Constructor Description
      MetadataMarshaller​(T defaultInstance)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T parseBytes​(byte[] serialized)
      Parse a serialized metadata value from bytes.
      byte[] toBytes​(T value)
      Serialize a metadata value to bytes.
      • Methods inherited from class java.lang.Object

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

      • defaultInstance

        private final T extends com.google.protobuf.MessageLite defaultInstance
    • Constructor Detail

      • MetadataMarshaller

        MetadataMarshaller​(T defaultInstance)
    • Method Detail

      • toBytes

        public byte[] toBytes​(T value)
        Description copied from interface: Metadata.BinaryMarshaller
        Serialize a metadata value to bytes.
        Specified by:
        toBytes in interface Metadata.BinaryMarshaller<T extends com.google.protobuf.MessageLite>
        Parameters:
        value - to serialize
        Returns:
        serialized version of value
      • parseBytes

        public T parseBytes​(byte[] serialized)
        Description copied from interface: Metadata.BinaryMarshaller
        Parse a serialized metadata value from bytes.
        Specified by:
        parseBytes in interface Metadata.BinaryMarshaller<T extends com.google.protobuf.MessageLite>
        Parameters:
        serialized - value of metadata to parse
        Returns:
        a parsed instance of type T