Interface SerializerDescriptor<T>

Type Parameters:
T - The type being serialized.

public interface SerializerDescriptor<T>
Description of the serialization used for individual elements related to a ParameterDescriptor.
  • Method Details

    • contentType

      CharSequence contentType()
      Get the suffix to application/grpc which described the Content-Type for the serialization. For example: +proto.
      Returns:
      the suffix to application/grpc which described the Content-Type for the serialization. For example: +proto.
    • serializer

      SerializerDeserializer<T> serializer()
      Get the SerializerDeserializer used to serialize and deserialize each object.
      Returns:
      the SerializerDeserializer used to serialize and deserialize each object.
    • bytesEstimator

      ToIntFunction<T> bytesEstimator()
      Get a function used to estimate the serialized size (in bytes) of each object. This is used to provide an estimate to pre-allocate memory to serialize into.
      Returns:
      a function used to estimate the serialized size (in bytes) of each object.