use of org.springframework.integration.groovy.GroovyCommandMessageProcessor in project spring-integration by spring-projects.
the class GroovyControlBusFactoryBean method createHandler.
@Override
protected MessageHandler createHandler() {
Binding binding = new ManagedBeansBinding(this.getBeanFactory());
GroovyCommandMessageProcessor processor = new GroovyCommandMessageProcessor(binding, message -> {
Map<String, Object> variables = new HashMap<>();
variables.put("headers", message.getHeaders());
return variables;
});
if (this.customizer != null) {
processor.setCustomizer(this.customizer);
}
if (this.beanClassLoader != null) {
processor.setBeanClassLoader(this.beanClassLoader);
}
if (getBeanFactory() != null) {
processor.setBeanFactory(getBeanFactory());
}
return this.configureHandler(new ServiceActivatingHandler(processor));
}
Aggregations