Class AbstractStandardMessageHandlerFactoryBean
java.lang.Object
org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean<MessageHandler>
org.springframework.integration.config.AbstractStandardMessageHandlerFactoryBean
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,BeanNameAware
,DisposableBean
,FactoryBean<MessageHandler>
,ApplicationContextAware
,ApplicationEventPublisherAware
- Direct Known Subclasses:
FilterFactoryBean
,RouterFactoryBean
,ServiceActivatorFactoryBean
,SplitterFactoryBean
,TransformerFactoryBean
public abstract class AbstractStandardMessageHandlerFactoryBean
extends AbstractSimpleMessageHandlerFactoryBean<MessageHandler>
implements DisposableBean
Base class for FactoryBeans that create standard MessageHandler instances.
- Author:
- Mark Fisher, Alexander Peters, Gary Russell, Artem Bilan, David Liu
-
Field Summary
Fields inherited from class org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected void
checkForIllegalTarget
(Object targetObject, String targetMethodName) protected MessageHandler
protected MessageHandler
createExpressionEvaluatingHandler
(Expression expression) protected MessageHandler
protected <T> MessageHandler
createMessageProcessingHandler
(MessageProcessor<T> processor) protected abstract MessageHandler
createMethodInvokingHandler
(Object targetObject, String targetMethodName) Subclasses must implement this method to create the MessageHandler.void
destroy()
protected boolean
methodIsHandleMessageOrEmpty
(String targetMethodName) protected void
void
setExpression
(Expression expression) Set a SpEL expression to use.void
setExpressionString
(String expressionString) Set a SpEL expression to use.void
setRequiresReply
(Boolean requiresReply) void
setSendTimeout
(Long sendTimeout) void
setTargetMethodName
(String targetMethodName) Set the method name for the message handler.void
setTargetObject
(Object targetObject) Set the target POJO for the message handler.Methods inherited from class org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean
createHandlerInternal, getBeanFactory, getObject, getObjectType, getPreCreationHandlerType, isSingleton, setAdviceChain, setApplicationContext, setApplicationEventPublisher, setAsync, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setOrder, setOutputChannel, setOutputChannelName
-
Constructor Details
-
AbstractStandardMessageHandlerFactoryBean
public AbstractStandardMessageHandlerFactoryBean()
-
-
Method Details
-
setTargetObject
Set the target POJO for the message handler.- Parameters:
targetObject
- the target object.
-
setTargetMethodName
Set the method name for the message handler.- Parameters:
targetMethodName
- the target method name.
-
setExpressionString
Set a SpEL expression to use.- Parameters:
expressionString
- the expression as a String.
-
setExpression
Set a SpEL expression to use.- Parameters:
expression
- the expression.
-
setRequiresReply
-
setSendTimeout
-
getSendTimeout
-
destroy
public void destroy()- Specified by:
destroy
in interfaceDisposableBean
-
createHandler
- Specified by:
createHandler
in classAbstractSimpleMessageHandlerFactoryBean<MessageHandler>
-
checkForIllegalTarget
-
createMethodInvokingHandler
protected abstract MessageHandler createMethodInvokingHandler(Object targetObject, String targetMethodName) Subclasses must implement this method to create the MessageHandler.- Parameters:
targetObject
- the object to use for method invocation.targetMethodName
- the method name of the target object to invoke.- Returns:
- the method invoking
MessageHandler
implementation.
-
createExpressionEvaluatingHandler
-
createMessageProcessingHandler
-
createDefaultHandler
-
methodIsHandleMessageOrEmpty
-
canBeUsedDirect
-
postProcessReplyProducer
-