Class DefaultDatatypeChannelMessageConverter
java.lang.Object
org.springframework.integration.support.converter.DefaultDatatypeChannelMessageConverter
- All Implemented Interfaces:
Aware,BeanFactoryAware,MessageConverter
public class DefaultDatatypeChannelMessageConverter extends Object implements MessageConverter, BeanFactoryAware
Default message converter for datatype channels. Registered under bean name
'datatypeChannelMessageConverter'. Delegates to the 'integrationConversionService',
if present.
- Since:
- 4.0
- Author:
- Gary Russell
-
Constructor Summary
Constructors Constructor Description DefaultDatatypeChannelMessageConverter() -
Method Summary
Modifier and Type Method Description ObjectfromMessage(Message<?> message, Class<?> targetClass)voidsetBeanFactory(BeanFactory beanFactory)voidsetConversionService(ConversionService conversionService)Specify theConversionServiceto use when trying to convert to requested type.Message<?>toMessage(Object payload, MessageHeaders header)
-
Constructor Details
-
DefaultDatatypeChannelMessageConverter
public DefaultDatatypeChannelMessageConverter()
-
-
Method Details
-
setConversionService
Specify theConversionServiceto use when trying to convert to requested type. If this property is not set explicitly but the converter is managed within a context, it will attempt to locate a bean named "integrationConversionService" defined within that context.- Parameters:
conversionService- The conversion service.
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Throws:
BeansException
-
fromMessage
- Specified by:
fromMessagein interfaceMessageConverter- Returns:
- the converted payload or null if conversion is not possible.
-
toMessage
- Specified by:
toMessagein interfaceMessageConverter
-