Class AbstractStandardMessageHandlerFactoryBean
java.lang.Object
org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean<org.springframework.messaging.MessageHandler>
org.springframework.integration.config.AbstractStandardMessageHandlerFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<org.springframework.messaging.MessageHandler>,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationEventPublisherAware
- Direct Known Subclasses:
FilterFactoryBean,RouterFactoryBean,ServiceActivatorFactoryBean,SplitterFactoryBean,TransformerFactoryBean
public abstract class AbstractStandardMessageHandlerFactoryBean
extends AbstractSimpleMessageHandlerFactoryBean<org.springframework.messaging.MessageHandler>
implements org.springframework.beans.factory.DisposableBean
Base class for FactoryBeans that create standard MessageHandler instances.
-
Field Summary
Fields inherited from class org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected voidcheckForIllegalTarget(Object targetObject, String targetMethodName) protected org.springframework.messaging.MessageHandlerprotected org.springframework.messaging.MessageHandlercreateExpressionEvaluatingHandler(org.springframework.expression.Expression expression) protected org.springframework.messaging.MessageHandlerprotected <T> org.springframework.messaging.MessageHandlercreateMessageProcessingHandler(MessageProcessor<T> processor) protected abstract org.springframework.messaging.MessageHandlercreateMethodInvokingHandler(Object targetObject, String targetMethodName) Subclasses must implement this method to create the MessageHandler.voiddestroy()protected booleanmethodIsHandleMessageOrEmpty(String targetMethodName) protected voidvoidsetExpression(org.springframework.expression.Expression expression) Set a SpEL expression to use.voidsetExpressionString(String expressionString) Set a SpEL expression to use.voidsetRequiresReply(Boolean requiresReply) voidsetSendTimeout(Long sendTimeout) voidsetTargetMethodName(String targetMethodName) Set the method name for the message handler.voidsetTargetObject(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
public void setExpression(org.springframework.expression.Expression expression) Set a SpEL expression to use.- Parameters:
expression- the expression.
-
setRequiresReply
-
setSendTimeout
-
getSendTimeout
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
createHandler
protected org.springframework.messaging.MessageHandler createHandler()- Specified by:
createHandlerin classAbstractSimpleMessageHandlerFactoryBean<org.springframework.messaging.MessageHandler>
-
checkForIllegalTarget
-
createMethodInvokingHandler
protected abstract org.springframework.messaging.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
MessageHandlerimplementation.
-
createExpressionEvaluatingHandler
protected org.springframework.messaging.MessageHandler createExpressionEvaluatingHandler(org.springframework.expression.Expression expression) -
createMessageProcessingHandler
protected <T> org.springframework.messaging.MessageHandler createMessageProcessingHandler(MessageProcessor<T> processor) -
createDefaultHandler
protected org.springframework.messaging.MessageHandler createDefaultHandler() -
methodIsHandleMessageOrEmpty
-
canBeUsedDirect
-
postProcessReplyProducer
-