use of com.swiftmq.amqp.v100.messaging.AMQPMessage in project swiftmq-ce by iitsoftware.
the class AMQPValueMapMessageFactory method create.
public AMQPMessage create(int sequenceNo) throws Exception {
AMQPMessage msg = new AMQPMessage();
Map map = new HashMap();
map.put(new AMQPString("key1"), new AMQPString("value1"));
map.put(new AMQPLong(Integer.MAX_VALUE + 1), new AMQPLong(200));
map.put(new AMQPString("key3"), new AMQPString("value1"));
map.put(new AMQPLong(Integer.MAX_VALUE + 2), new AMQPLong(400));
msg.setAmqpValue(new AmqpValue(new AMQPMap(map)));
return msg;
}
use of com.swiftmq.amqp.v100.messaging.AMQPMessage in project swiftmq-ce by iitsoftware.
the class AMQPValueStringMessageFactory method createReplyMessage.
public AMQPMessage createReplyMessage(AMQPMessage request) throws Exception {
AMQPMessage reply = new AMQPMessage();
reply.setAmqpValue(new AmqpValue(new AMQPString("RE: " + ((AMQPString) request.getAmqpValue().getValue()).getValue())));
return reply;
}
use of com.swiftmq.amqp.v100.messaging.AMQPMessage in project swiftmq-ce by iitsoftware.
the class AMQPValueStringMessageFactory method create.
public AMQPMessage create(int sequenceNo) throws Exception {
AMQPMessage msg = new AMQPMessage();
msg.setAmqpValue(new AmqpValue(new AMQPString("Message #" + sequenceNo)));
return msg;
}
use of com.swiftmq.amqp.v100.messaging.AMQPMessage in project swiftmq-ce by iitsoftware.
the class DataMessageFactory method create.
public AMQPMessage create(int sequenceNo) throws Exception {
AMQPMessage msg = new AMQPMessage();
msg.addData(new Data(b));
msg.addData(new Data(b));
msg.addData(new Data(b));
return msg;
}
use of com.swiftmq.amqp.v100.messaging.AMQPMessage in project swiftmq-ce by iitsoftware.
the class DataMessageFactory method createReplyMessage.
public AMQPMessage createReplyMessage(AMQPMessage request) throws Exception {
AMQPMessage reply = new AMQPMessage();
List data = request.getData();
for (int i = 0; i < data.size(); i++) reply.addData((Data) data.get(i));
return reply;
}
Aggregations