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
A
MessageChannelConfigurer that sets data types and message converters based on
BindingProperties.contentType. Also
adds a ChannelInterceptor 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 ClassesModifier and TypeClassDescriptionfinal classPartitioning channel interceptor. -
Constructor Summary
ConstructorsConstructorDescriptionMessageConverterConfigurer(BindingServiceProperties bindingServiceProperties, org.springframework.messaging.converter.CompositeMessageConverter compositeMessageConverter) MessageConverterConfigurer(BindingServiceProperties bindingServiceProperties, org.springframework.messaging.converter.CompositeMessageConverter compositeMessageConverter, StreamFunctionProperties streamFunctionProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureInputChannel(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 Details
-
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 Details
-
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
Description copied from interface:MessageChannelAndSourceConfigurerConfigure the provided message source binding.- Specified by:
configurePolledMessageSourcein interfaceMessageChannelAndSourceConfigurer- Parameters:
binding- the binding.name- the name.
-