formatting
This commit is contained in:
@@ -23,6 +23,7 @@ import java.util.List;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.channel.MessageChannel;
|
||||
@@ -40,6 +41,7 @@ public class AggregatorParserTests {
|
||||
|
||||
private ApplicationContext context;
|
||||
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
context = new ClassPathXmlApplicationContext("aggregatorParserTests.xml", this.getClass());
|
||||
@@ -98,6 +100,7 @@ public class AggregatorParserTests {
|
||||
99, getPropertyValue(completeAggregatingMessageHandler, "trackedCorrelationIdCapacity", int.class));
|
||||
}
|
||||
|
||||
|
||||
private static Message<?> createMessage(String payload, Object correlationId, int sequenceSize, int sequenceNumber,
|
||||
MessageChannel replyChannel) {
|
||||
StringMessage message = new StringMessage(payload);
|
||||
@@ -120,4 +123,5 @@ public class AggregatorParserTests {
|
||||
ReflectionUtils.makeAccessible(field);
|
||||
return field.get(beanUnderTest);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.springframework.integration.config;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.integration.message.StringMessage;
|
||||
@@ -32,7 +32,8 @@ import org.springframework.integration.router.MessageSequenceComparator;
|
||||
*/
|
||||
public class TestAggregator implements Aggregator {
|
||||
|
||||
ConcurrentHashMap<Object, Message<?>> aggregatedMessages = new ConcurrentHashMap<Object, Message<?>>();
|
||||
private final ConcurrentMap<Object, Message<?>> aggregatedMessages = new ConcurrentHashMap<Object, Message<?>>();
|
||||
|
||||
|
||||
public Message<?> aggregate(List<Message<?>> messages) {
|
||||
List<Message<?>> sortableList = new ArrayList<Message<?>>(messages);
|
||||
@@ -46,10 +47,8 @@ public class TestAggregator implements Aggregator {
|
||||
return returnedMessage;
|
||||
}
|
||||
|
||||
public ConcurrentHashMap<Object, Message<?>> getAggregatedMessages() {
|
||||
public ConcurrentMap<Object, Message<?>> getAggregatedMessages() {
|
||||
return aggregatedMessages;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
<aggregator id="aggregatorWithReference" ref="aggregatorBean"/>
|
||||
|
||||
<aggregator id="completelyDefinedAggregator"
|
||||
ref="aggregatorBean"
|
||||
<aggregator id="completelyDefinedAggregator"
|
||||
ref="aggregatorBean"
|
||||
completion-strategy="completionStrategy"
|
||||
default-reply-channel="replyChannel"
|
||||
discard-channel="discardChannel"
|
||||
@@ -18,9 +18,13 @@
|
||||
send-partial-result-on-timeout="true"
|
||||
reaper-interval="135"
|
||||
tracked-correlation-id-capacity="99"/>
|
||||
|
||||
|
||||
<channel id="replyChannel"/>
|
||||
|
||||
<channel id="discardChannel"/>
|
||||
|
||||
<beans:bean id="aggregatorBean" class="org.springframework.integration.config.TestAggregator"/>
|
||||
|
||||
<beans:bean id="completionStrategy" class="org.springframework.integration.config.TestCompletionStrategy"/>
|
||||
|
||||
</beans:beans>
|
||||
|
||||
Reference in New Issue
Block a user