Moved MethodInvokingConsumer from 'handler' to 'message', and replaced MessageFilter in 'handler' with FilterEndpoint in the new 'filter' package.

This commit is contained in:
Mark Fisher
2008-09-23 20:07:04 +00:00
parent b4ab2d5365
commit 8b59050571
6 changed files with 15 additions and 16 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.handler;
package org.springframework.integration.filter;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -25,6 +25,7 @@ import org.junit.Test;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.channel.QueueChannel;
import org.springframework.integration.filter.FilterEndpoint;
import org.springframework.integration.message.Message;
import org.springframework.integration.message.StringMessage;
import org.springframework.integration.message.selector.MessageSelector;
@@ -36,7 +37,7 @@ public class MessageFilterTests {
@Test
public void filterAcceptsMessage() {
MessageFilter filter = new MessageFilter(new MessageSelector() {
FilterEndpoint filter = new FilterEndpoint(new MessageSelector() {
public boolean accept(Message<?> message) {
return true;
}
@@ -47,7 +48,7 @@ public class MessageFilterTests {
@Test
public void filterRejectsMessage() {
MessageFilter filter = new MessageFilter(new MessageSelector() {
FilterEndpoint filter = new FilterEndpoint(new MessageSelector() {
public boolean accept(Message<?> message) {
return false;
}
@@ -59,7 +60,7 @@ public class MessageFilterTests {
public void filterAcceptsWithChannels() {
DirectChannel inputChannel = new DirectChannel();
QueueChannel outputChannel = new QueueChannel();
MessageFilter filter = new MessageFilter(new MessageSelector() {
FilterEndpoint filter = new FilterEndpoint(new MessageSelector() {
public boolean accept(Message<?> message) {
return true;
}
@@ -78,7 +79,7 @@ public class MessageFilterTests {
public void filterRejectsWithChannels() {
DirectChannel inputChannel = new DirectChannel();
QueueChannel outputChannel = new QueueChannel();
MessageFilter filter = new MessageFilter(new MessageSelector() {
FilterEndpoint filter = new FilterEndpoint(new MessageSelector() {
public boolean accept(Message<?> message) {
return false;
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.integration.handler;
package org.springframework.integration.message;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -31,9 +31,11 @@ import org.springframework.integration.ConfigurationException;
import org.springframework.integration.bus.DefaultMessageBus;
import org.springframework.integration.channel.QueueChannel;
import org.springframework.integration.endpoint.ServiceActivatorEndpoint;
import org.springframework.integration.handler.TestSink;
import org.springframework.integration.message.GenericMessage;
import org.springframework.integration.message.Message;
import org.springframework.integration.message.MessagingException;
import org.springframework.integration.message.MethodInvokingConsumer;
import org.springframework.integration.message.StringMessage;
/**