MessageChannels no longer implement MessageTarget, and MessageEndpoints that send a reply have a setOutputChannel() method instead of setTarget().
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user