diff --git a/org.springframework.integration/.classpath b/org.springframework.integration/.classpath index d8b3f86eb6..85b5f296bb 100644 --- a/org.springframework.integration/.classpath +++ b/org.springframework.integration/.classpath @@ -1,7 +1,7 @@ - + diff --git a/org.springframework.integration/.settings/org.eclipse.jdt.core.prefs b/org.springframework.integration/.settings/org.eclipse.jdt.core.prefs index dcdd934845..fbe50adc1f 100644 --- a/org.springframework.integration/.settings/org.eclipse.jdt.core.prefs +++ b/org.springframework.integration/.settings/org.eclipse.jdt.core.prefs @@ -1,7 +1,12 @@ -#Wed Apr 28 07:56:59 BST 2010 +#Tue May 04 06:48:00 BST 2010 eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java b/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java index 24c56bbb2d..de9ef6bf1e 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java @@ -249,12 +249,12 @@ public class CorrelatingMessageHandler extends AbstractMessageHandler implements } private void mark(MessageGroup group) { - store.mark(group); + store.markMessageGroup(group); } private void remove(MessageGroup group) { Object correlationKey = group.getCorrelationKey(); - store.deleteMessageGroup(correlationKey); + store.removeMessageGroup(correlationKey); locks.remove(correlationKey); } diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/store/MessageGroupStore.java b/org.springframework.integration/src/main/java/org/springframework/integration/store/MessageGroupStore.java index 610ae743ad..c8ad2beef4 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/store/MessageGroupStore.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/store/MessageGroupStore.java @@ -34,19 +34,17 @@ public interface MessageGroupStore { * {@link #addMessageToGroup(Object, Collection)} with this correlation id. * * @return a group of messages, empty if none exists for this key - * - * @see org.springframework.integration.core.MessageHeaders#getCorrelationId() */ - MessageGroup getMessageGroup(Object correlationId); + MessageGroup getMessageGroup(Object correlationKey); /** - * Store a message with an association to a correlation id. This can be used to group messages together instead of + * Store a message with an association to a correlation key. This can be used to group messages together instead of * storing them just under their id. * - * @param correlationId the correlation id to store the message under + * @param correlationKey the correlation id to store the message under * @param message a message */ - void addMessageToGroup(Object correlationId, Message message); + void addMessageToGroup(Object correlationKey, Message message); /** * Persist the mark on all the messages from the group. The group is modified in the process as all its unmarked @@ -54,13 +52,13 @@ public interface MessageGroupStore { * * @param group a MessageGroup with no unmarked messages */ - void mark(MessageGroup group); + void markMessageGroup(MessageGroup group); /** - * Delete all the messages from the association with this correlation id. + * Remove the message group with this correlation key. * - * @param correlationId the correlation id to remove + * @param correlationKey the correlation id to remove */ - void deleteMessageGroup(Object correlationId); + void removeMessageGroup(Object correlationKey); } \ No newline at end of file diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/store/SimpleMessageStore.java b/org.springframework.integration/src/main/java/org/springframework/integration/store/SimpleMessageStore.java index 224cf97bda..90f999003b 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/store/SimpleMessageStore.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/store/SimpleMessageStore.java @@ -60,17 +60,13 @@ public class SimpleMessageStore implements MessageStore, MessageGroupStore { this(0); } - @SuppressWarnings("unchecked") public Message addMessage(Message message) { if (!upperBound.tryAcquire(0)) { throw new MessagingException(this.getClass().getSimpleName() + " was out of capacity at, try constructing it with a larger capacity."); } - Object correlationId = message.getHeaders().getCorrelationId(); - if (correlationId != null) { - getMessageGroupInternal(correlationId).add(message); - } - return (Message) this.idToMessage.put(message.getHeaders().getId(), message); + this.idToMessage.put(message.getHeaders().getId(), message); + return message; } public Message getMessage(UUID key) { @@ -86,10 +82,6 @@ public class SimpleMessageStore implements MessageStore, MessageGroupStore { return null; } - public int size() { - return this.idToMessage.size(); - } - public MessageGroup getMessageGroup(Object correlationId) { Assert.notNull(correlationId, "'correlationKey' must not be null"); MessageGroup collection = correlationToMessageGroup.get(correlationId); @@ -103,14 +95,14 @@ public class SimpleMessageStore implements MessageStore, MessageGroupStore { getMessageGroupInternal(correlationId).add(message); } - public void mark(MessageGroup group) { + public void markMessageGroup(MessageGroup group) { Object correlationId = group.getCorrelationKey(); MessageGroup internal = getMessageGroupInternal(correlationId); internal.mark(); group.mark(); } - public void deleteMessageGroup(Object correlationId) { + public void removeMessageGroup(Object correlationId) { correlationToMessageGroup.remove(correlationId); }