public abstract class AbstractSimpleMessageHandlerFactoryBean<H extends MessageHandler> extends Object implements FactoryBean<MessageHandler>, ApplicationContextAware, BeanFactoryAware, BeanNameAware, ApplicationEventPublisherAware
MessageHandler
.Modifier and Type | Field and Description |
---|---|
protected Log |
logger |
OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
AbstractSimpleMessageHandlerFactoryBean() |
Modifier and Type | Method and 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 an
AbstractReplyProducingMessageHandler 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.
|
protected final Log logger
public AbstractSimpleMessageHandlerFactoryBean()
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public void setBeanName(String beanName)
setBeanName
in interface BeanNameAware
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher
in interface ApplicationEventPublisherAware
public void setChannelResolver(DestinationResolver<MessageChannel> channelResolver)
channelResolver
- the channel resolver to set.public void setOutputChannel(MessageChannel outputChannel)
outputChannel
- the output channel to set.public void setOutputChannelName(String outputChannelName)
outputChannelName
- the output channel bean name to set.public void setOrder(Integer order)
order
- the order to set.public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
protected BeanFactory getBeanFactory()
public void setAdviceChain(List<Advice> adviceChain)
AbstractReplyProducingMessageHandler
to advise just this local endpoint.
For other handlers, the advice chain is applied around the handler itself.adviceChain
- the adviceChain to set.public void setAsync(Boolean async)
AbstractReplyProducingMessageHandler
can potentially
return a ListenableFuture<?>
.async
- the async to set.public void setComponentName(String componentName)
componentName
- The component name.public H getObject()
getObject
in interface FactoryBean<MessageHandler>
protected final H createHandlerInternal()
protected abstract H createHandler()
public Class<? extends MessageHandler> getObjectType()
getObjectType
in interface FactoryBean<MessageHandler>
protected Class<? extends MessageHandler> getPreCreationHandlerType()
public boolean isSingleton()
isSingleton
in interface FactoryBean<MessageHandler>