Removed BlockingChannel interface. The send(message, timeout) method is now defined directly in the top-level MessageChannel interface.
This commit is contained in:
@@ -206,12 +206,10 @@ public class MessageChannelTemplateTests {
|
||||
public void sendWithReturnAddress() throws InterruptedException {
|
||||
final List<String> replies = new ArrayList<String>(3);
|
||||
final CountDownLatch latch = new CountDownLatch(3);
|
||||
MessageChannel replyChannel = new MessageChannel() {
|
||||
public String getName() {
|
||||
return "testReplyChannel";
|
||||
}
|
||||
public boolean send(Message<?> replyMessage) {
|
||||
replies.add((String) replyMessage.getPayload());
|
||||
MessageChannel replyChannel = new AbstractMessageChannel() {
|
||||
@Override
|
||||
protected boolean doSend(Message<?> message, long timeout) {
|
||||
replies.add((String) message.getPayload());
|
||||
latch.countDown();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.beans.DirectFieldAccessor;
|
||||
import org.springframework.beans.FatalBeanException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.channel.BlockingChannel;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.channel.PollableChannel;
|
||||
import org.springframework.integration.channel.PublishSubscribeChannel;
|
||||
@@ -53,7 +52,7 @@ public class ChannelParserTests {
|
||||
public void testChannelWithCapacity() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"channelParserTests.xml", this.getClass());
|
||||
BlockingChannel channel = (BlockingChannel) context.getBean("capacityChannel");
|
||||
MessageChannel channel = (MessageChannel) context.getBean("capacityChannel");
|
||||
for (int i = 0; i < 10; i++) {
|
||||
boolean result = channel.send(new GenericMessage<String>("test"), 10);
|
||||
assertTrue(result);
|
||||
|
||||
Reference in New Issue
Block a user