Spring Integration

org.springframework.integration.endpoint
Class MethodInvokingMessageSource

java.lang.Object
  extended by org.springframework.integration.util.AbstractExpressionEvaluator
      extended by org.springframework.integration.endpoint.AbstractMessageSource<java.lang.Object>
          extended by org.springframework.integration.endpoint.MethodInvokingMessageSource
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, MessageSource<java.lang.Object>

public class MethodInvokingMessageSource
extends AbstractMessageSource<java.lang.Object>
implements org.springframework.beans.factory.InitializingBean

A MessageSource implementation that invokes a no-argument method so that its return value may be sent to a channel.

Author:
Mark Fisher

Constructor Summary
MethodInvokingMessageSource()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  java.lang.Object doReceive()
          Subclasses must implement this method.
 void setMethod(java.lang.reflect.Method method)
           
 void setMethodName(java.lang.String methodName)
           
 void setObject(java.lang.Object object)
           
 
Methods inherited from class org.springframework.integration.endpoint.AbstractMessageSource
receive, setHeaderExpressions
 
Methods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getEvaluationContext, setBeanFactory, setBeanResolver, setConversionService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodInvokingMessageSource

public MethodInvokingMessageSource()
Method Detail

setObject

public void setObject(java.lang.Object object)

setMethod

public void setMethod(java.lang.reflect.Method method)

setMethodName

public void setMethodName(java.lang.String methodName)

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

doReceive

protected java.lang.Object doReceive()
Description copied from class: AbstractMessageSource
Subclasses must implement this method. Typically the returned value will be the payload of type T, but the returned value may also be a Message instance whose payload is of type T.

Specified by:
doReceive in class AbstractMessageSource<java.lang.Object>

Spring Integration