Message payload can no longer be set. MessageTransformer's transform() method now returns a Message (instead of void). ChannelInterceptor preSend() and postReceive() methods now return a Message instead of boolean.
This commit is contained in:
@@ -28,6 +28,7 @@ import org.junit.Test;
|
||||
import org.springframework.integration.channel.AbstractMessageChannel;
|
||||
import org.springframework.integration.channel.ChannelInterceptor;
|
||||
import org.springframework.integration.channel.MessageChannel;
|
||||
import org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.integration.message.selector.MessageSelector;
|
||||
|
||||
@@ -38,6 +39,7 @@ public class ChannelInterceptorRegisteringBeanPostProcessorTests {
|
||||
|
||||
public ArrayList<String> matchAll;
|
||||
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
matchAll = new ArrayList<String>();
|
||||
@@ -45,6 +47,7 @@ public class ChannelInterceptorRegisteringBeanPostProcessorTests {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testWithAbstractMessageChannel() {
|
||||
ChannelInterceptorRegisteringBeanPostProcessor postprocessor = new ChannelInterceptorRegisteringBeanPostProcessor(
|
||||
@@ -74,25 +77,11 @@ public class ChannelInterceptorRegisteringBeanPostProcessorTests {
|
||||
}
|
||||
|
||||
|
||||
static class TestInterceptor implements ChannelInterceptor {
|
||||
|
||||
public void postReceive(Message<?> message, MessageChannel channel) {
|
||||
}
|
||||
|
||||
public void postSend(Message<?> message, MessageChannel channel, boolean sent) {
|
||||
}
|
||||
|
||||
public boolean preReceive(MessageChannel channel) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean preSend(Message<?> message, MessageChannel channel) {
|
||||
return false;
|
||||
}
|
||||
private static class TestInterceptor extends ChannelInterceptorAdapter {
|
||||
}
|
||||
|
||||
|
||||
static class TestChannel extends AbstractMessageChannel {
|
||||
private static class TestChannel extends AbstractMessageChannel {
|
||||
|
||||
ChannelInterceptor channelInterceptor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user