Class AbstractSimpleMessageHandlerFactoryBean<H extends org.springframework.messaging.MessageHandler>
java.lang.Object
org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean<H>
- Type Parameters:
H- the target message handler type.
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.FactoryBean<org.springframework.messaging.MessageHandler>,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationEventPublisherAware
- Direct Known Subclasses:
AbstractStandardMessageHandlerFactoryBean,AggregatorFactoryBean,ExpressionControlBusFactoryBean
public abstract class AbstractSimpleMessageHandlerFactoryBean<H extends org.springframework.messaging.MessageHandler>
extends Object
implements org.springframework.beans.factory.FactoryBean<org.springframework.messaging.MessageHandler>, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.context.ApplicationEventPublisherAware
Factory bean to create and configure a
MessageHandler.-
Field Summary
FieldsFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Hprotected final Hprotected org.springframework.beans.factory.BeanFactoryClass<? extends org.springframework.messaging.MessageHandler>protected Class<? extends org.springframework.messaging.MessageHandler>Subclasses can override this to return a more specific type before handler creation.booleanvoidsetAdviceChain(List<org.aopalliance.aop.Advice> adviceChain) Set the advice chain to be configured within anAbstractReplyProducingMessageHandlerto advise just this local endpoint.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) voidCurrently only exposed on the service activator namespace.voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) voidsetBeanName(String beanName) voidsetChannelResolver(org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel> channelResolver) Set the handler's channel resolver.voidsetComponentName(String componentName) Sets the name of the handler component.voidSet the order in which the handler will be subscribed to its channel (when subscribable).voidsetOutputChannel(org.springframework.messaging.MessageChannel outputChannel) Set the handler's output channel.voidsetOutputChannelName(String outputChannelName) Set the handler's output channel name.
-
Field Details
-
logger
protected final org.apache.commons.logging.Log logger
-
-
Constructor Details
-
AbstractSimpleMessageHandlerFactoryBean
public AbstractSimpleMessageHandlerFactoryBean()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
setBeanName
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) - Specified by:
setApplicationEventPublisherin interfaceorg.springframework.context.ApplicationEventPublisherAware
-
setChannelResolver
public void setChannelResolver(org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel> channelResolver) Set the handler's channel resolver.- Parameters:
channelResolver- the channel resolver to set.
-
setOutputChannel
public void setOutputChannel(org.springframework.messaging.MessageChannel outputChannel) Set the handler's output channel.- Parameters:
outputChannel- the output channel to set.
-
setOutputChannelName
Set the handler's output channel name.- Parameters:
outputChannelName- the output channel bean name to set.- Since:
- 5.1.4
-
setOrder
Set the order in which the handler will be subscribed to its channel (when subscribable).- Parameters:
order- the order to set.
-
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
-
getBeanFactory
protected org.springframework.beans.factory.BeanFactory getBeanFactory() -
setAdviceChain
Set the advice chain to be configured within anAbstractReplyProducingMessageHandlerto advise just this local endpoint. For other handlers, the advice chain is applied around the handler itself.- Parameters:
adviceChain- the adviceChain to set.
-
setAsync
Currently only exposed on the service activator namespace. It's not clear that other endpoints would benefit from async support, but any subclass ofAbstractReplyProducingMessageHandlercan potentially return aListenableFuture<?>.- Parameters:
async- the async to set.- Since:
- 4.3
-
setComponentName
Sets the name of the handler component.- Parameters:
componentName- The component name.
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<H extends org.springframework.messaging.MessageHandler>
-
createHandlerInternal
-
createHandler
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<H extends org.springframework.messaging.MessageHandler>
-
getPreCreationHandlerType
Subclasses can override this to return a more specific type before handler creation. After handler creation, the actual type is used.- Returns:
- the type.
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<H extends org.springframework.messaging.MessageHandler>
-