org.springframework.integration.message
Class MethodInvokingSource
java.lang.Object
org.springframework.integration.message.MethodInvokingSource
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, MessageSource<java.lang.Object>, PollableSource<java.lang.Object>
public class MethodInvokingSource
- extends java.lang.Object
- implements PollableSource<java.lang.Object>, org.springframework.beans.factory.InitializingBean
A pollable source that invokes a no-argument method so that its return value
may be sent to a channel.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
object
private volatile java.lang.Object object
method
private volatile java.lang.reflect.Method method
methodName
private volatile java.lang.String methodName
invoker
private volatile MethodInvoker invoker
MethodInvokingSource
public MethodInvokingSource()
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:
PollableSource
- Retrieve a message from this source or
null
if no message is available.
- Specified by:
receive
in interface PollableSource<java.lang.Object>