org.springframework.integration.router
Class MethodInvokingRouter
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.router.AbstractMessageRouter
org.springframework.integration.router.MethodInvokingRouter
- All Implemented Interfaces:
- BeanFactoryAware, BeanNameAware, InitializingBean, Ordered, NamedComponent, Orderable, MessageHandler, TrackableComponent
public class MethodInvokingRouter
- extends AbstractMessageRouter
A Message Router that invokes the specified method on the given object. The
method's return value may be a single MessageChannel instance, a single
String to be interpreted as a channel name, or a Collection (or Array) of
either type. If the method returns channel names, then a
ChannelResolver
is required.
Method Summary |
protected java.util.List<java.lang.Object> |
getChannelIdentifiers(Message<?> message)
Subclasses must implement this method to return the channel identifiers. |
void |
onInit()
Subclasses may implement this for initialization logic. |
Methods inherited from class org.springframework.integration.router.AbstractMessageRouter |
getComponentType, getMessagingTemplate, getRequiredConversionService, handleMessageInternal, removeChannelMapping, setApplySequence, setChannelIdentifierMap, setChannelMapping, setChannelResolver, setDefaultOutputChannel, setIgnoreChannelNameResolutionFailures, setIgnoreSendFailures, setPrefix, setResolutionRequired, setSuffix, setTimeout |
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MethodInvokingRouter
public MethodInvokingRouter(java.lang.Object object,
java.lang.reflect.Method method)
MethodInvokingRouter
public MethodInvokingRouter(java.lang.Object object,
java.lang.String methodName)
MethodInvokingRouter
public MethodInvokingRouter(java.lang.Object object)
onInit
public final void onInit()
- Description copied from class:
IntegrationObjectSupport
- Subclasses may implement this for initialization logic.
- Overrides:
onInit
in class AbstractMessageRouter
getChannelIdentifiers
protected java.util.List<java.lang.Object> getChannelIdentifiers(Message<?> message)
- Description copied from class:
AbstractMessageRouter
- Subclasses must implement this method to return the channel identifiers.
- Specified by:
getChannelIdentifiers
in class AbstractMessageRouter