From 970852741d8ad6778101fa73ecf6bda34c1f7f37 Mon Sep 17 00:00:00 2001
From: Gary Russell
*
- *
* A Message Router that sends Messages to a list of recipient channels. The
diff --git a/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/JdbcMessageHandler.java b/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/JdbcMessageHandler.java
index 5e7988df45..c6dafcfcf4 100644
--- a/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/JdbcMessageHandler.java
+++ b/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/JdbcMessageHandler.java
@@ -38,7 +38,7 @@ import org.springframework.util.LinkedCaseInsensitiveMap;
* {@link SqlParameterSourceFactory} abstraction, the default implementation of which wraps the message so that its bean
* properties can be referred to by name in the query string E.g.
*
- *
+ *
* MessageBuilder.withPayload("foo").setHeader("key1", "value1").setHeader("key2", "value2");
*
* or create an instance of GenericMessage passing payload as {@link Object} and headers as a regular {@link Map}
- *
+ *
* Map headers = new HashMap();
* headers.put("key1", "value1");
* headers.put("key2", "value2");
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/handler/MessageHandlerChain.java b/spring-integration-core/src/main/java/org/springframework/integration/handler/MessageHandlerChain.java
index 3d891ceb2b..56cbe5383f 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/handler/MessageHandlerChain.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/handler/MessageHandlerChain.java
@@ -52,13 +52,15 @@ import org.springframework.util.Assert;
* the configuration by removing channels that can be created implicitly.
*
- * <chain>
- * <filter ref="someFilter"/>
- * <bean class="SomeMessageHandlerImplementation"/>
- * <transformer ref="someTransformer"/>
- * <aggregator ... />
- * </chain>
+ *
+ * {@code
+ *
*
* @author Mark Fisher
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/router/RecipientListRouter.java b/spring-integration-core/src/main/java/org/springframework/integration/router/RecipientListRouter.java
index 3e89c93921..601d8fd51b 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/router/RecipientListRouter.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/router/RecipientListRouter.java
@@ -27,11 +27,13 @@ import org.springframework.integration.core.MessageSelector;
import org.springframework.util.Assert;
/**
- *
- * <recipient-list-router id="simpleRouter" input-channel="routingChannelA">
- * <recipient channel="channel1"/>
- * <recipient channel="channel2"/>
- * </recipient-list-router>
+ *
+ * {@code
+ *
*
+ *
* INSERT INTO FOOS (MESSAGE_ID, PAYLOAD) VALUES (:headers[id], :payload)
*
*
@@ -101,6 +101,7 @@ public class JdbcMessageHandler extends AbstractMessageHandler {
/**
* Executes the update, passing the message into the {@link SqlParameterSourceFactory}.
*/
+ @Override
protected void handleMessageInternal(Message> message) throws MessageRejectedException, MessageHandlingException,
MessageDeliveryException {
List extends Map
- * NOTICE: This implementation may change for Spring Integration - * 3.0. It is provided for use-cases where the current {@link JdbcMessageStore} - * is not delivering the desired performance characteristics. - *
- * - ** As such, the {@link JdbcChannelMessageStore} uses database specific SQL queries. *
*
@@ -89,8 +83,8 @@ import org.springframework.util.StringUtils;
* database table only. The SQL scripts to create the necessary table are packaged
* under org/springframework/integration/jdbc/messagestore/channel/schema-*.sql,
* where * denotes the target database type.
- *
For this to work, you must setup the corresponding * {@link TransactionSynchronizationFactory}:
* - *
+ *
* {@code
*
*
@@ -343,7 +337,7 @@ public class JdbcChannelMessageStore extends AbstractMessageGroupStore implement
* This {@link TransactionSynchronizationFactory} is then referenced in the
* transaction configuration of the poller:
*
- *
+ *
* {@code
*
diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/HeaderMatcher.java b/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/HeaderMatcher.java
index bd40145834..20bc3fb590 100644
--- a/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/HeaderMatcher.java
+++ b/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/HeaderMatcher.java
@@ -15,17 +15,18 @@
*/
package org.springframework.integration.test.matcher;
-import org.hamcrest.Description;
-import org.hamcrest.Factory;
-import org.hamcrest.Matcher;
-import org.junit.Assert;
-import org.springframework.integration.Message;
-import org.springframework.integration.MessageHeaders;
+import static org.hamcrest.CoreMatchers.is;
import java.util.Date;
import java.util.Map;
-import static org.hamcrest.CoreMatchers.is;
+import org.hamcrest.Description;
+import org.hamcrest.Factory;
+import org.hamcrest.Matcher;
+import org.junit.Assert;
+
+import org.springframework.integration.Message;
+import org.springframework.integration.MessageHeaders;
/**
* Are the {@link MessageHeaders} of a {@link Message} containing any entry
@@ -35,30 +36,34 @@ import static org.hamcrest.CoreMatchers.is;
* entry:
*
*
- *
- * ANY_HEADER_KEY = "foo";
- * ANY_HEADER_VALUE = "bar";
+ *
+ * {@code
+ * ANY_HEADER_KEY = "foo";
+ * ANY_HEADER_VALUE = "bar";
* assertThat(message, hasEntry(ANY_HEADER_KEY, ANY_HEADER_VALUE));
* assertThat(message, hasEntry(ANY_HEADER_KEY, is(String.class)));
* assertThat(message, hasEntry(ANY_HEADER_KEY, notNullValue()));
* assertThat(message, hasEntry(ANY_HEADER_KEY, is(ANY_HEADER_VALUE)));
+ * }
*
*
* For multiple entries to match all:
*
- *
- * Map<String, Object> expectedInHeaderMap = new HashMap<String, Object>();
+ *
+ * {@code
+ * Map expectedInHeaderMap = new HashMap();
* expectedInHeaderMap.put(ANY_HEADER_KEY, ANY_HEADER_VALUE);
* expectedInHeaderMap.put(OTHER_HEADER_KEY, is(OTHER_HEADER_VALUE));
* assertThat(message, HeaderMatcher.hasAllEntries(expectedInHeaderMap));
+ * }
*
*
*
* For a single key:
*
*
- *
- * ANY_HEADER_KEY = "foo";
+ *
+ * ANY_HEADER_KEY = "foo";
* assertThat(message, HeaderMatcher.hasKey(ANY_HEADER_KEY));
*
*
diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/MapContentMatchers.java b/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/MapContentMatchers.java
index 98e29142e6..4997dbca7a 100644
--- a/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/MapContentMatchers.java
+++ b/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/MapContentMatchers.java
@@ -33,7 +33,7 @@ import org.hamcrest.core.IsEqual;
* It is possible to match a single entry by value or matcher like this:
*
*
- *
+ *
* assertThat(map, hasEntry(SOME_KEY, is(SOME_VALUE)));
* assertThat(map, hasEntry(SOME_KEY, is(String.class)));
* assertThat(map, hasEntry(SOME_KEY, notNullValue()));
@@ -43,16 +43,18 @@ import org.hamcrest.core.IsEqual;
* It's also possible to match multiple entries in a map:
*
*
- *
- * Map<String, Object> expectedInMap = new HashMap<String, Object>();
+ *
+ * {@code
+ * Map expectedInMap = new HashMap();
* expectedInMap.put(SOME_KEY, SOME_VALUE);
* expectedInMap.put(OTHER_KEY, is(OTHER_VALUE));
* assertThat(map, hasAllEntries(expectedInMap));
+ * }
*
*
* If you only need to verify the existence of a key:
*
- *
+ *
* assertThat(map, hasKey(SOME_KEY));
*
*
diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/MockitoMessageMatchers.java b/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/MockitoMessageMatchers.java
index cf188b34a5..5a5c4e5a44 100644
--- a/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/MockitoMessageMatchers.java
+++ b/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/MockitoMessageMatchers.java
@@ -23,6 +23,7 @@ import java.util.Map;
import org.hamcrest.Matcher;
import org.mockito.Mockito;
+
import org.springframework.integration.Message;
/**
@@ -38,22 +39,26 @@ import org.springframework.integration.Message;
* With {@link Mockito#verify(Object)}:
*
*
- *
+ *
+ * {@code
* @Mock
* MessageHandler handler;
* ...
* handler.handleMessage(message);
* verify(handler).handleMessage(messageWithPayload(SOME_PAYLOAD));
* verify(handler).handleMessage(messageWithPayload(is(SOME_CLASS)));
+ * }
*
*
* With {@link Mockito#when(Object)}:
*
*
- *
+ *
+ * {@code
* ...
* when(channel.send(messageWithPayload(SOME_PAYLOAD))).thenReturn(true);
* assertThat(channel.send(message), is(true));
+ * }
*
*
* @author Alex Peters
@@ -64,12 +69,12 @@ public class MockitoMessageMatchers {
@SuppressWarnings("unchecked")
public static Message messageWithPayload(Matcher payloadMatcher) {
- return (Message) argThat(hasPayload(payloadMatcher));
+ return argThat(hasPayload(payloadMatcher));
}
@SuppressWarnings("unchecked")
public static Message messageWithPayload(T payload) {
- return (Message) argThat(hasPayload(payload));
+ return argThat(hasPayload(payload));
}
public static Message> messageWithHeaderEntry(String key, Object value) {
diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/PayloadMatcher.java b/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/PayloadMatcher.java
index 0f85d89637..383254ee32 100644
--- a/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/PayloadMatcher.java
+++ b/spring-integration-test/src/main/java/org/springframework/integration/test/matcher/PayloadMatcher.java
@@ -20,6 +20,7 @@ import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import org.hamcrest.core.IsEqual;
import org.junit.Assert;
+
import org.springframework.integration.Message;
/**
@@ -29,17 +30,20 @@ import org.springframework.integration.Message;
* A Junit example using {@link Assert#assertThat(Object, Matcher)} could look
* like this to test a payload value:
*
- *
- * ANY_PAYLOAD = new BigDecimal("1.123");
- * Message<BigDecimal message = MessageBuilder.withPayload(ANY_PAYLOAD).build();
+ *
+ * {@code
+ * ANY_PAYLOAD = new BigDecimal("1.123");
+ * Message
+ *
*
* An example using {@link Assert#assertThat(Object, Matcher)} delegating to
* another {@link Matcher}.
*
- *
- * ANY_PAYLOAD = new BigDecimal("1.123");
+ *
+ * ANY_PAYLOAD = new BigDecimal("1.123");
* assertThat(message, PayloadMatcher.hasPayload(is(BigDecimal.class)));
* assertThat(message, PayloadMatcher.hasPayload(notNullValue()));
* assertThat(message, not((PayloadMatcher.hasPayload(is(String.class))))); *
diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/util/SocketUtils.java b/spring-integration-test/src/main/java/org/springframework/integration/test/util/SocketUtils.java
index e54f27cbc4..b57d959ca7 100644
--- a/spring-integration-test/src/main/java/org/springframework/integration/test/util/SocketUtils.java
+++ b/spring-integration-test/src/main/java/org/springframework/integration/test/util/SocketUtils.java
@@ -47,7 +47,7 @@ public final class SocketUtils {
* the need to use the methods of this class multiple times from within your
* Spring Application Context XML file using SpEL. Of course you can do:
*
- *
+ *
* {@code
* ...port="#{T(org.springframework.integration.test.util.SocketUtils).findAvailableServerSocket(12000)}"
* }
@@ -57,7 +57,7 @@ public final class SocketUtils {
* This will be acceptable for single use, but if you need to invoke the
* methods numerous time, you may instead want to do this:
*
- *
+ *
* {@code
*
*