use of org.springframework.integration.splitter.DefaultMessageSplitter in project spring-integration-samples by spring-projects.
the class Application method splitter.
@Bean
@ServiceActivator(inputChannel = "splitChannel")
public MessageHandler splitter() {
DefaultMessageSplitter splitter = new DefaultMessageSplitter();
splitter.setOutputChannelName("headerEnricherChannel");
return splitter;
}
use of org.springframework.integration.splitter.DefaultMessageSplitter in project spring-integration by spring-projects.
the class SplitterFactoryBean method postProcessReplyProducer.
@Override
protected void postProcessReplyProducer(AbstractMessageProducingHandler handler) {
super.postProcessReplyProducer(handler);
if (!(handler instanceof AbstractMessageSplitter)) {
Assert.isNull(this.applySequence, "Cannot set applySequence if the referenced bean is " + "an AbstractReplyProducingMessageHandler, but not an AbstractMessageSplitter");
Assert.isNull(this.delimiters, "Cannot set delimiters if the referenced bean is not an " + "an AbstractReplyProducingMessageHandler, but not an AbstractMessageSplitter");
} else {
AbstractMessageSplitter splitter = (AbstractMessageSplitter) handler;
if (this.delimiters != null) {
Assert.isInstanceOf(DefaultMessageSplitter.class, splitter, "The 'delimiters' property is only available for a Splitter definition where no 'ref', " + "'expression', or inner bean has been provided.");
((DefaultMessageSplitter) splitter).setDelimiters(this.delimiters);
}
if (this.applySequence != null) {
splitter.setApplySequence(this.applySequence);
}
}
}
Aggregations