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
-
Field Summary
Fields inherited from class org.springframework.messaging.converter.AbstractMessageConverter
logger
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractAvroMessageConverter
(Collection<org.springframework.util.MimeType> supportedMimeTypes, AvroSchemaServiceManager manager) protected
AbstractAvroMessageConverter
(org.springframework.util.MimeType supportedMimeType, AvroSchemaServiceManager avroSchemaServiceManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected AvroSchemaServiceManager
protected boolean
canConvertFrom
(org.springframework.messaging.Message<?> message, Class<?> targetClass) protected Object
convertFromInternal
(org.springframework.messaging.Message<?> message, Class<?> targetClass, Object conversionHint) protected Object
convertToInternal
(Object payload, org.springframework.messaging.MessageHeaders headers, Object conversionHint) protected org.apache.avro.Schema
parseSchema
(org.springframework.core.io.Resource r) protected abstract org.apache.avro.Schema
resolveReaderSchemaForDeserialization
(Class<?> targetClass) protected abstract org.apache.avro.Schema
resolveSchemaForWriting
(Object payload, org.springframework.messaging.MessageHeaders headers, org.springframework.util.MimeType hintedContentType) protected abstract org.apache.avro.Schema
resolveWriterSchemaForDeserialization
(org.springframework.util.MimeType mimeType) Methods inherited from class org.springframework.messaging.converter.AbstractMessageConverter
addSupportedMimeTypes, canConvertTo, fromMessage, fromMessage, getContentTypeResolver, getDefaultContentType, getMimeType, getSerializedPayloadClass, getSupportedMimeTypes, isStrictContentTypeMatch, setContentTypeResolver, setSerializedPayloadClass, setStrictContentTypeMatch, supports, supportsMimeType, toMessage, toMessage
-
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
-
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 classorg.springframework.messaging.converter.AbstractMessageConverter
-
convertFromInternal
protected Object convertFromInternal(org.springframework.messaging.Message<?> message, Class<?> targetClass, Object conversionHint) - Overrides:
convertFromInternal
in classorg.springframework.messaging.converter.AbstractMessageConverter
-
convertToInternal
protected Object convertToInternal(Object payload, org.springframework.messaging.MessageHeaders headers, Object conversionHint) - Overrides:
convertToInternal
in classorg.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)
-