. !
1) AbstractMessageProducingHandler:
protected void sendOutputs(Object result, Message<?> requestMessage) {
if (result instanceof Iterable<?> && shouldSplitOutput((Iterable<?>) result)) {
for (Object o : (Iterable<?>) result) {
this.produceOutput(o, requestMessage);
}
}
else if (result != null) {
this.produceOutput(result, requestMessage);
}
}
output-channel.
2) , DirectChannel, . , raw java:
for (Object o : collection) {
}
: sync, , . - Exception. , Java: -).
3) . raw Java :
split(Collection<?>, Future<?>);
--->>
for (Object o : collection) {
process(Object, Future<?>)
}
splitter EIP. push. , replyChannel.
, , Future<?> - replyChannel. , , . . TemporaryReplyChannel.
, async, . ExecutorChannel output-channel <splitter> , . , , . , <aggregator>.
, -.