Build on top of Spring 4's new messaging types

This commit updates Spring Integration to depend upon Spring 4, making
use of the message types that have moved from Spring Integration into
Spring's new spring-messaging module.

The default message converter no longer supports conversion of a
message that is null, throwing an IllegalArgumentException if an
attempt is made to convert null. Furthermore, GenericMessagingTemplate
does not support sending null, again throwing an
IllegalArgumentException. Previously, MessagingTemplate had no-oped an
attempt to send null.

ConcurrentAggregatorTests and AggregatorTests both had a single test
that was specifically testing the behaviour of an aggregator that
returns null for its message. These tests have been removed.

CorrelatingMessageHandlerTests have been updated to specify some
additional behaviour for its mocks so that null messages are not
returned.

These are the only functional changes that have been made. All other
changes are simply for moving to the repackaged and/or renamed types.

In the move to being part of core Spring, a number of constants and
header accessor methods have moved from MessageHeaders to
MessageHeaderAccessor. This commit continues this pattern for
the enterprise integration headers that are specific to Spring
Integration. A new class, EiMessageHeaderAccessor, has been created.
This class provides constants and methods for working with SI-specific
headers. The main code and tests have been updated to use this new
class.
This commit is contained in:
Andy Wilkinson
2013-09-10 13:35:53 +01:00
committed by Gary Russell
parent 8dca61c62a
commit 28ab8394de
1156 changed files with 3332 additions and 5834 deletions

View File

@@ -416,7 +416,7 @@ public abstract class AbstractMailReceiver extends IntegrationObjectSupport impl
return AbstractMailReceiver.this.obtainFolderInstance();
}
catch (MessagingException e) {
throw new org.springframework.integration.MessagingException("Unable to obtain the mail folder", e);
throw new org.springframework.messaging.MessagingException("Unable to obtain the mail folder", e);
}
}

View File

@@ -230,7 +230,7 @@ public class ImapIdleChannelAdapter extends MessageProducerSupport implements Be
"Failure in 'idle' task. Will resubmit.", e);
}
else {
throw new org.springframework.integration.MessagingException(
throw new org.springframework.messaging.MessagingException(
"Failure in 'idle' task. Will NOT resubmit.", e);
}
}
@@ -240,7 +240,7 @@ public class ImapIdleChannelAdapter extends MessageProducerSupport implements Be
private Runnable createMessageSendingTask(final Message mailMessage){
Runnable sendingTask = new Runnable() {
public void run() {
org.springframework.integration.Message<?> message =
org.springframework.messaging.Message<?> message =
MessageBuilder.withPayload(mailMessage).build();
if (TransactionSynchronizationManager.isActualTransactionActive()) {

View File

@@ -22,8 +22,8 @@ import java.util.concurrent.ConcurrentLinkedQueue;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.integration.Message;
import org.springframework.integration.MessagingException;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
import org.springframework.integration.core.MessageSource;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.util.Assert;

View File

@@ -20,10 +20,10 @@ import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.integration.Message;
import org.springframework.messaging.Message;
import org.springframework.integration.MessageHandlingException;
import org.springframework.integration.MessageHeaders;
import org.springframework.integration.core.MessageHandler;
import org.springframework.messaging.MessageHeaders;
import org.springframework.messaging.MessageHandler;
import org.springframework.integration.handler.AbstractMessageHandler;
import org.springframework.integration.mapping.MessageMappingException;
import org.springframework.mail.MailMessage;
@@ -119,7 +119,7 @@ public class MailSendingMessageHandler extends AbstractMessageHandler {
return new MimeMailMessage(mimeMessage);
}
catch (Exception e) {
throw new org.springframework.integration.MessagingException("Failed to creaet MimeMessage with contentType: " +
throw new org.springframework.messaging.MessagingException("Failed to creaet MimeMessage with contentType: " +
contentType, e);
}
}

View File

@@ -1,4 +1,4 @@
/**
* Provides classes for configuration - parsers, namespace handlers.
*/
package org.springframework.integration.mail.config;
package org.springframework.integration.mail.config;

View File

@@ -1,4 +1,4 @@
/**
* Base package for Mail support.
*/
package org.springframework.integration.mail;
package org.springframework.integration.mail;

View File

@@ -25,8 +25,8 @@ import javax.mail.Message.RecipientType;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.integration.Message;
import org.springframework.integration.MessagingException;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
import org.springframework.integration.mail.MailHeaders;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.transformer.MessageTransformationException;

View File

@@ -1,4 +1,4 @@
/**
* Provides classes related to transforming mail messages.
*/
package org.springframework.integration.mail.transformer;
package org.springframework.integration.mail.transformer;

View File

@@ -123,7 +123,7 @@
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type
type="org.springframework.integration.MessageChannel" />
type="org.springframework.messaging.MessageChannel" />
</tool:annotation>
</xsd:appinfo>
<xsd:documentation>
@@ -329,7 +329,7 @@
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.integration.MessageChannel"/>
<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
@@ -338,7 +338,7 @@
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.integration.MessageChannel"/>
<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>