Class MethodInvokingMessageHandler
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.handler.MethodInvokingMessageHandler
- All Implemented Interfaces:
org.reactivestreams.Subscriber<org.springframework.messaging.Message<?>>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle,org.springframework.core.Ordered,ExpressionCapable,Orderable,IntegrationPattern,NamedComponent,IntegrationManagement,ManageableLifecycle,TrackableComponent,org.springframework.messaging.MessageHandler,reactor.core.CoreSubscriber<org.springframework.messaging.Message<?>>
public class MethodInvokingMessageHandler extends AbstractMessageHandler implements ManageableLifecycle
A
MessageHandler that invokes the specified
method on the provided object.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME -
Constructor Summary
Constructors Constructor Description MethodInvokingMessageHandler(java.lang.Object object, java.lang.reflect.Method method)MethodInvokingMessageHandler(java.lang.Object object, java.lang.String methodName) -
Method Summary
Modifier and Type Method Description java.lang.StringgetComponentType()Subclasses may implement this method to provide component type information.protected voidhandleMessageInternal(org.springframework.messaging.Message<?> message)booleanisRunning()voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)voidsetComponentType(java.lang.String componentType)voidstart()voidstop()Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
handleMessage, onComplete, onError, onNext, onSubscribeMethods inherited from class org.springframework.integration.handler.MessageHandlerSupport
buildSendTimer, destroy, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getOrder, getOverrides, isLoggingEnabled, registerMetricsCaptor, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, onInit, setApplicationContext, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getThisAsMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName
-
Constructor Details
-
MethodInvokingMessageHandler
public MethodInvokingMessageHandler(java.lang.Object object, java.lang.reflect.Method method) -
MethodInvokingMessageHandler
public MethodInvokingMessageHandler(java.lang.Object object, java.lang.String methodName)
-
-
Method Details
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Overrides:
setBeanFactoryin classIntegrationObjectSupport
-
setComponentType
public void setComponentType(java.lang.String componentType) -
getComponentType
public java.lang.String getComponentType()Description copied from class:IntegrationObjectSupportSubclasses may implement this method to provide component type information.- Specified by:
getComponentTypein interfaceNamedComponent- Overrides:
getComponentTypein classMessageHandlerSupport
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle- Specified by:
startin interfaceManageableLifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle- Specified by:
stopin interfaceManageableLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle- Specified by:
isRunningin interfaceManageableLifecycle
-
handleMessageInternal
protected void handleMessageInternal(org.springframework.messaging.Message<?> message)- Specified by:
handleMessageInternalin classAbstractMessageHandler
-