MessageChannels no longer implement MessageTarget, and MessageEndpoints that send a reply have a setOutputChannel() method instead of setTarget().

This commit is contained in:
Mark Fisher
2008-09-05 16:36:13 +00:00
parent 63720ded3f
commit b47d81ff16
42 changed files with 304 additions and 354 deletions

View File

@@ -29,9 +29,9 @@ import java.util.concurrent.Executors;
import org.junit.Test;
import org.springframework.integration.channel.MessageChannel;
import org.springframework.integration.channel.QueueChannel;
import org.springframework.integration.message.Message;
import org.springframework.integration.message.MessageTarget;
import org.springframework.integration.message.StringMessage;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
@@ -64,8 +64,8 @@ public class HttpInvokerGatewayTests {
Executors.newSingleThreadExecutor().execute(new Runnable() {
public void run() {
Message<?> message = channel.receive();
MessageTarget replyTarget = (MessageTarget) message.getHeaders().getReturnAddress();
replyTarget.send(new StringMessage(message.getPayload().toString().toUpperCase()));
MessageChannel replyChannel = (MessageChannel) message.getHeaders().getReturnAddress();
replyChannel.send(new StringMessage(message.getPayload().toString().toUpperCase()));
}
});
HttpInvokerGateway gateway = new HttpInvokerGateway(channel);