On way would be to write a BeanFactoryPostProcessor; call getBeanNamesForType(MessageHandlerChain.class); iterate over the results, getting the bean definitions by name; access the 'handlers' property. That is a list of BeanDefinitionHolders; iterate over it, accessing the BeanDefinition therein; if it matches the criteria, update its properties as needed.
But, it would probably be much simpler to just use expressions in your <service-activator/>s.
For example, instead of
Code:
<int:service-activator ref="datablockServiceEntryPointImpl" method="executeDatablock" />
use
Code:
<int:service-activator expression="@datablockServiceEntryPointImpl.executeDatablock(payload)" />
Then, the client is just required to provide a <bean/> called "datablockServiceEntryPointImpl" - perhaps via your custom namespace handler.
edit: Well, actually, this is no different to using a ref and method
Last edited by Gary Russell; Jul 4th, 2012 at 04:54 PM.
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware