|
29 | 29 | import com.rabbitmq.client.Envelope; |
30 | 30 | import com.rabbitmq.client.GetResponse; |
31 | 31 | import com.rabbitmq.client.MessageProperties; |
| 32 | +import com.rabbitmq.client.Method; |
32 | 33 | import com.rabbitmq.client.ReturnListener; |
33 | 34 | import com.rabbitmq.client.ShutdownSignalException; |
34 | 35 | import com.rabbitmq.client.impl.AMQConnection; |
35 | | -import com.rabbitmq.client.impl.AMQImpl; |
36 | 36 | import com.rabbitmq.client.impl.FrameHandler; |
37 | | -import com.rabbitmq.client.impl.Method; |
38 | 37 | import com.rabbitmq.client.impl.SocketFrameHandler; |
39 | 38 | import com.rabbitmq.utility.BlockingCell; |
40 | 39 | import com.rabbitmq.utility.Utility; |
@@ -233,7 +232,12 @@ public void run() throws IOException { |
233 | 232 | _ch1.setReturnListener(new ReturnListener() { |
234 | 233 | public void handleReturn(int replyCode, String replyText, String exchange, String routingKey, AMQP.BasicProperties properties, byte[] body) |
235 | 234 | throws IOException { |
236 | | - Method method = new AMQImpl.Basic.Return(replyCode, replyText, exchange, routingKey); |
| 235 | + Method method = new AMQP.Basic.Return.Builder() |
| 236 | + .replyCode(replyCode) |
| 237 | + .replyText(replyText) |
| 238 | + .exchange(exchange) |
| 239 | + .routingKey(routingKey) |
| 240 | + .build(); |
237 | 241 | log("Handling return with body " + new String(body)); |
238 | 242 | returnCell.set(new Object[] { method, properties, body }); |
239 | 243 | } |
@@ -430,7 +434,7 @@ public void tryTopics() throws IOException { |
430 | 434 |
|
431 | 435 | public void doBasicReturn(BlockingCell<Object> cell, int expectedCode) { |
432 | 436 | Object[] a = (Object[]) cell.uninterruptibleGet(); |
433 | | - AMQImpl.Basic.Return method = (AMQImpl.Basic.Return) a[0]; |
| 437 | + AMQP.Basic.Return method = (AMQP.Basic.Return) a[0]; |
434 | 438 | log("Returned: " + method); |
435 | 439 | log(" - props: " + a[1]); |
436 | 440 | log(" - body: " + new String((byte[]) a[2])); |
|
0 commit comments