public class MethodInvokingMessageSource extends AbstractMessageSource<Object> implements ManageableLifecycle
MessageSource implementation that
invokes a no-argument method so that its return value may be sent to a channel.IntegrationManagement.ManagementOverridesEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description |
|---|
MethodInvokingMessageSource() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
doReceive()
Subclasses must implement this method.
|
String |
getComponentType() |
boolean |
isRunning() |
protected void |
onInit() |
void |
setMethod(Method method) |
void |
setMethodName(String methodName) |
void |
setObject(Object object) |
void |
start() |
void |
stop() |
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeafterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIntegrationPatternTypegetThisAspublic void setObject(Object object)
public void setMethod(Method method)
public void setMethodName(String methodName)
public String getComponentType()
getComponentType in interface NamedComponentprotected void onInit()
onInit in class AbstractExpressionEvaluatorpublic void start()
start in interface Lifecyclestart in interface ManageableLifecyclepublic void stop()
stop in interface Lifecyclestop in interface ManageableLifecyclepublic boolean isRunning()
isRunning in interface LifecycleisRunning in interface ManageableLifecycleprotected Object doReceive()
AbstractMessageSourcepayload of
type T, but the returned value may also be a Message instance whose payload is of type T;
also can be AbstractIntegrationMessageBuilder which is used for additional headers population.doReceive in class AbstractMessageSource<Object>