Class ConfigurableCompositeMessageConverter
java.lang.Object
org.springframework.messaging.converter.CompositeMessageConverter
org.springframework.integration.support.converter.ConfigurableCompositeMessageConverter
- All Implemented Interfaces:
Aware,BeanFactoryAware,InitializingBean,MessageConverter,SmartMessageConverter
public class ConfigurableCompositeMessageConverter extends CompositeMessageConverter implements BeanFactoryAware, InitializingBean
A
CompositeMessageConverter extension with some default MessageConverters
which can be overridden with the given converters
or added in the end of target converters collection.
The default converts are (declared exactly in this order):
-
MappingJackson2MessageConverterif Jackson processor is present in classpath; -
ByteArrayMessageConverter -
ObjectStringMessageConverter -
GenericMessageConverter
- Since:
- 5.0
- Author:
- Artem Bilan
-
Constructor Summary
Constructors Constructor Description ConfigurableCompositeMessageConverter()Create an instance with the default converters.ConfigurableCompositeMessageConverter(Collection<MessageConverter> converters)Create an instance with the given converters and without defaults.ConfigurableCompositeMessageConverter(Collection<MessageConverter> converters, boolean registerDefaults)Create an instance with the given converters and with defaults in the end. -
Method Summary
Modifier and Type Method Description voidafterPropertiesSet()voidsetBeanFactory(BeanFactory beanFactory)Methods inherited from class org.springframework.messaging.converter.CompositeMessageConverter
fromMessage, fromMessage, getConverters, toMessage, toMessage, toString
-
Constructor Details
-
ConfigurableCompositeMessageConverter
public ConfigurableCompositeMessageConverter()Create an instance with the default converters. -
ConfigurableCompositeMessageConverter
Create an instance with the given converters and without defaults.- Parameters:
converters- the converters to use
-
ConfigurableCompositeMessageConverter
public ConfigurableCompositeMessageConverter(Collection<MessageConverter> converters, boolean registerDefaults)Create an instance with the given converters and with defaults in the end.- Parameters:
converters- the converters to useregisterDefaults- register or not default converts
-
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Throws:
BeansException
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceInitializingBean
-