Class MessageConverterConfigurer
- java.lang.Object
-
- org.springframework.cloud.stream.binding.MessageConverterConfigurer
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,MessageChannelAndSourceConfigurer,MessageChannelConfigurer
public class MessageConverterConfigurer extends Object implements MessageChannelAndSourceConfigurer, org.springframework.beans.factory.BeanFactoryAware
AMessageChannelConfigurerthat sets data types and message converters based onBindingProperties.contentType. Also adds aChannelInterceptorto the message channel to set the `ContentType` header for the message (if not already set) based on the `ContentType` binding property of the channel.- Author:
- Ilayaperumal Gopinathan, Marius Bogoevici, Maxim Kirilov, Gary Russell, Soby Chacko, Oleg Zhurakousky
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classMessageConverterConfigurer.PartitioningInterceptorPartitioning channel interceptor.
-
Constructor Summary
Constructors Constructor Description MessageConverterConfigurer(BindingServiceProperties bindingServiceProperties, org.springframework.messaging.converter.CompositeMessageConverter compositeMessageConverter)MessageConverterConfigurer(BindingServiceProperties bindingServiceProperties, org.springframework.messaging.converter.CompositeMessageConverter compositeMessageConverter, StreamFunctionProperties streamFunctionProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureInputChannel(org.springframework.messaging.MessageChannel messageChannel, String channelName)Configure the given input message channel.voidconfigureOutputChannel(org.springframework.messaging.MessageChannel messageChannel, String channelName)Configure the given output message channel.voidconfigurePolledMessageSource(PollableMessageSource binding, String name)Configure the provided message source binding.voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-
-
-
Constructor Detail
-
MessageConverterConfigurer
public MessageConverterConfigurer(BindingServiceProperties bindingServiceProperties, org.springframework.messaging.converter.CompositeMessageConverter compositeMessageConverter, StreamFunctionProperties streamFunctionProperties)
-
MessageConverterConfigurer
public MessageConverterConfigurer(BindingServiceProperties bindingServiceProperties, org.springframework.messaging.converter.CompositeMessageConverter compositeMessageConverter)
-
-
Method Detail
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
configureInputChannel
public void configureInputChannel(org.springframework.messaging.MessageChannel messageChannel, String channelName)Description copied from interface:MessageChannelConfigurerConfigure the given input message channel.- Specified by:
configureInputChannelin interfaceMessageChannelConfigurer- Parameters:
messageChannel- the message channelchannelName- name of the message channel
-
configureOutputChannel
public void configureOutputChannel(org.springframework.messaging.MessageChannel messageChannel, String channelName)Description copied from interface:MessageChannelConfigurerConfigure the given output message channel.- Specified by:
configureOutputChannelin interfaceMessageChannelConfigurer- Parameters:
messageChannel- the message channelchannelName- name of the message channel
-
configurePolledMessageSource
public void configurePolledMessageSource(PollableMessageSource binding, String name)
Description copied from interface:MessageChannelAndSourceConfigurerConfigure the provided message source binding.- Specified by:
configurePolledMessageSourcein interfaceMessageChannelAndSourceConfigurer- Parameters:
binding- the binding.name- the name.
-
-