org.springframework.integration.message
Class MethodInvokingMessageSource

java.lang.Object
  extended by org.springframework.integration.message.MethodInvokingMessageSource
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, MessageSource<java.lang.Object>

public class MethodInvokingMessageSource
extends java.lang.Object
implements MessageSource<java.lang.Object>, 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()
           
 Message<java.lang.Object> receive()
          Retrieve the next available message from this source.
 void setMethod(java.lang.reflect.Method method)
           
 void setMethodName(java.lang.String methodName)
           
 void setObject(java.lang.Object object)
           
 
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

receive

public Message<java.lang.Object> receive()
Description copied from interface: MessageSource
Retrieve the next available message from this source. Returns null if no message is available.

Specified by:
receive in interface MessageSource<java.lang.Object>