Class AbstractSimpleMessageHandlerFactoryBean<H extends MessageHandler>
java.lang.Object
org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean<H>
- All Implemented Interfaces:
Aware,BeanFactoryAware,BeanNameAware,FactoryBean<MessageHandler>,ApplicationContextAware,ApplicationEventPublisherAware
- Direct Known Subclasses:
AbstractStandardMessageHandlerFactoryBean,AggregatorFactoryBean,ExpressionControlBusFactoryBean,FileWritingMessageHandlerFactoryBean,GroovyControlBusFactoryBean,JpaOutboundGatewayFactoryBean
public abstract class AbstractSimpleMessageHandlerFactoryBean<H extends MessageHandler> extends Object implements FactoryBean<MessageHandler>, ApplicationContextAware, BeanFactoryAware, BeanNameAware, ApplicationEventPublisherAware
Factory bean to create and configure a
MessageHandler.- Author:
- Dave Syer, Oleg Zhurakousky, Gary Russell, Artem Bilan, David Liu
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractSimpleMessageHandlerFactoryBean() -
Method Summary
Modifier and Type Method Description protected abstract HcreateHandler()protected HcreateHandlerInternal()protected BeanFactorygetBeanFactory()HgetObject()Class<? extends MessageHandler>getObjectType()protected Class<? extends MessageHandler>getPreCreationHandlerType()Subclasses can override this to return a more specific type before handler creation.booleanisSingleton()voidsetAdviceChain(List<Advice> adviceChain)Set the advice chain to be configured within anAbstractReplyProducingMessageHandlerto advise just this local endpoint.voidsetApplicationContext(ApplicationContext applicationContext)voidsetApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)voidsetAsync(Boolean async)Currently only exposed on the service activator namespace.voidsetBeanFactory(BeanFactory beanFactory)voidsetBeanName(String beanName)voidsetChannelResolver(DestinationResolver<MessageChannel> channelResolver)Set the handler's channel resolver.voidsetComponentName(String componentName)Sets the name of the handler component.voidsetOrder(Integer order)Set the order in which the handler will be subscribed to its channel (when subscribable).voidsetOutputChannel(MessageChannel outputChannel)Set the handler's output channel.voidsetOutputChannelName(String outputChannelName)Set the handler's output channel name.
-
Field Details
-
Constructor Details
-
AbstractSimpleMessageHandlerFactoryBean
public AbstractSimpleMessageHandlerFactoryBean()
-
-
Method Details
-
setApplicationContext
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-
setBeanName
- Specified by:
setBeanNamein interfaceBeanNameAware
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisherin interfaceApplicationEventPublisherAware
-
setChannelResolver
Set the handler's channel resolver.- Parameters:
channelResolver- the channel resolver to set.
-
setOutputChannel
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
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Throws:
BeansException
-
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 interfaceFactoryBean<H extends MessageHandler>
-
createHandlerInternal
-
createHandler
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<H extends 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 interfaceFactoryBean<H extends MessageHandler>
-