org.springframework.integration.message
Class MethodInvokingSource

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

public class MethodInvokingSource
extends java.lang.Object
implements Source<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

Nested Class Summary
private static class MethodInvokingSource.MessageReceivingMethodValidator
           
 
Field Summary
private  NameResolvingMethodInvoker invoker
           
private  java.lang.String method
           
private  java.lang.Object object
           
 
Constructor Summary
MethodInvokingSource()
           
 
Method Summary
 void afterPropertiesSet()
           
 Message<java.lang.Object> receive()
          Retrieve a message from this source or null if no message is available.
 void setMethod(java.lang.String method)
           
 void setObject(java.lang.Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

object

private java.lang.Object object

method

private java.lang.String method

invoker

private NameResolvingMethodInvoker invoker
Constructor Detail

MethodInvokingSource

public MethodInvokingSource()
Method Detail

setObject

public void setObject(java.lang.Object object)

setMethod

public void setMethod(java.lang.String method)

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: Source
Retrieve a message from this source or null if no message is available.

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