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
AMessageChannelConfigurer
that sets data types and message converters based onBindingProperties.contentType
. Also adds aChannelInterceptor
to 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 class
MessageConverterConfigurer.PartitioningInterceptor
Partitioning 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 void
configureInputChannel(org.springframework.messaging.MessageChannel messageChannel, String channelName)
Configure the given input message channel.void
configureOutputChannel(org.springframework.messaging.MessageChannel messageChannel, String channelName)
Configure the given output message channel.void
configurePolledMessageSource(PollableMessageSource binding, String name)
Configure the provided message source binding.void
setBeanFactory(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:
setBeanFactory
in 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:MessageChannelConfigurer
Configure the given input message channel.- Specified by:
configureInputChannel
in 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:MessageChannelConfigurer
Configure the given output message channel.- Specified by:
configureOutputChannel
in interfaceMessageChannelConfigurer
- Parameters:
messageChannel
- the message channelchannelName
- name of the message channel
-
configurePolledMessageSource
public void configurePolledMessageSource(PollableMessageSource binding, String name)
Description copied from interface:MessageChannelAndSourceConfigurer
Configure the provided message source binding.- Specified by:
configurePolledMessageSource
in interfaceMessageChannelAndSourceConfigurer
- Parameters:
binding
- the binding.name
- the name.
-
-