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 H
createHandler()
protected H
createHandlerInternal()
protected BeanFactory
getBeanFactory()
H
getObject()
Class<? extends MessageHandler>
getObjectType()
protected Class<? extends MessageHandler>
getPreCreationHandlerType()
Subclasses can override this to return a more specific type before handler creation.boolean
isSingleton()
void
setAdviceChain(List<Advice> adviceChain)
Set the advice chain to be configured within anAbstractReplyProducingMessageHandler
to advise just this local endpoint.void
setApplicationContext(ApplicationContext applicationContext)
void
setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
void
setAsync(Boolean async)
Currently only exposed on the service activator namespace.void
setBeanFactory(BeanFactory beanFactory)
void
setBeanName(String beanName)
void
setChannelResolver(DestinationResolver<MessageChannel> channelResolver)
Set the handler's channel resolver.void
setComponentName(String componentName)
Sets the name of the handler component.void
setOrder(Integer order)
Set the order in which the handler will be subscribed to its channel (when subscribable).void
setOutputChannel(MessageChannel outputChannel)
Set the handler's output channel.void
setOutputChannelName(String outputChannelName)
Set the handler's output channel name.
-
Field Details
-
Constructor Details
-
AbstractSimpleMessageHandlerFactoryBean
public AbstractSimpleMessageHandlerFactoryBean()
-
-
Method Details
-
setApplicationContext
- Specified by:
setApplicationContext
in interfaceApplicationContextAware
- Throws:
BeansException
-
setBeanName
- Specified by:
setBeanName
in interfaceBeanNameAware
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisher
in 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:
setBeanFactory
in interfaceBeanFactoryAware
- Throws:
BeansException
-
getBeanFactory
-
setAdviceChain
Set the advice chain to be configured within anAbstractReplyProducingMessageHandler
to 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 ofAbstractReplyProducingMessageHandler
can 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:
getObject
in interfaceFactoryBean<H extends MessageHandler>
-
createHandlerInternal
-
createHandler
-
getObjectType
- Specified by:
getObjectType
in 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:
isSingleton
in interfaceFactoryBean<H extends MessageHandler>
-