Class AbstractAvroMessageConverter

java.lang.Object
org.springframework.messaging.converter.AbstractMessageConverter
org.springframework.cloud.function.context.converter.avro.AbstractAvroMessageConverter
All Implemented Interfaces:
org.springframework.messaging.converter.MessageConverter, org.springframework.messaging.converter.SmartMessageConverter
Direct Known Subclasses:
AvroSchemaMessageConverter

public abstract class AbstractAvroMessageConverter extends org.springframework.messaging.converter.AbstractMessageConverter
Base class for Apache Avro MessageConverter implementations.
Since:
3.2.0
Author:
Marius Bogoevici, Vinicius Carvalho, Sercan Karaoglu, Ish Mahajan
  • Constructor Details

    • AbstractAvroMessageConverter

      protected AbstractAvroMessageConverter(org.springframework.util.MimeType supportedMimeType, AvroSchemaServiceManager avroSchemaServiceManager)
    • AbstractAvroMessageConverter

      protected AbstractAvroMessageConverter(Collection<org.springframework.util.MimeType> supportedMimeTypes, AvroSchemaServiceManager manager)
  • Method Details

    • avroSchemaServiceManager

      protected AvroSchemaServiceManager avroSchemaServiceManager()
    • parseSchema

      protected org.apache.avro.Schema parseSchema(org.springframework.core.io.Resource r) throws IOException
      Throws:
      IOException
    • canConvertFrom

      protected boolean canConvertFrom(org.springframework.messaging.Message<?> message, Class<?> targetClass)
      Overrides:
      canConvertFrom in class org.springframework.messaging.converter.AbstractMessageConverter
    • convertFromInternal

      protected Object convertFromInternal(org.springframework.messaging.Message<?> message, Class<?> targetClass, Object conversionHint)
      Overrides:
      convertFromInternal in class org.springframework.messaging.converter.AbstractMessageConverter
    • convertToInternal

      protected Object convertToInternal(Object payload, org.springframework.messaging.MessageHeaders headers, Object conversionHint)
      Overrides:
      convertToInternal in class org.springframework.messaging.converter.AbstractMessageConverter
    • resolveSchemaForWriting

      protected abstract org.apache.avro.Schema resolveSchemaForWriting(Object payload, org.springframework.messaging.MessageHeaders headers, org.springframework.util.MimeType hintedContentType)
    • resolveWriterSchemaForDeserialization

      protected abstract org.apache.avro.Schema resolveWriterSchemaForDeserialization(org.springframework.util.MimeType mimeType)
    • resolveReaderSchemaForDeserialization

      protected abstract org.apache.avro.Schema resolveReaderSchemaForDeserialization(Class<?> targetClass)