session.setAddress(msg, sendingAddress); } else { msg.setAddress(sendingAddress);
@Override public final void setJMSDestination(Destination destination) throws JMSException { if (destination == null) { message.setAddress((SimpleString)null); } else { message.setAddress(((ActiveMQDestination) destination).getSimpleAddress()); } }
@Override public final void setJMSDestination(Destination destination) throws JMSException { if (destination == null) { message.setAddress((SimpleString)null); } else { message.setAddress(((ActiveMQDestination) destination).getSimpleAddress()); } }
protected Message generateMessage(final long id) { ICoreMessage message = new CoreMessage(id, 1000); message.setMessageID(id); message.getBodyBuffer().writeString(UUID.randomUUID().toString()); message.setAddress(new SimpleString("foo")); return message; }
protected ICoreMessage createMessage(final long messageId, final SimpleString destination, final ByteBuffer buffer) { ICoreMessage msg = new CoreMessage(messageId, 200); msg.setAddress(destination); msg.getBodyBuffer().writeBytes(buffer); return msg; }
/** * @param simpleDestination * @param page * @param numberOfElements * @return * @throws Exception */ protected void addPageElements(final SimpleString simpleDestination, final Page page, final int numberOfElements) throws Exception { int initialNumberOfMessages = page.getNumberOfMessages(); for (int i = 0; i < numberOfElements; i++) { ICoreMessage msg = new CoreMessage().initBuffer(100); for (int j = 0; j < 10; j++) { msg.getBodyBuffer().writeByte((byte) 'b'); } msg.setAddress(simpleDestination); page.write(new PagedMessageImpl(msg, new long[0])); Assert.assertEquals(initialNumberOfMessages + i + 1, page.getNumberOfMessages()); } }
session.setAddress(msg, sendingAddress); } else { msg.setAddress(sendingAddress);
session.setAddress(msg, sendingAddress); } else { msg.setAddress(sendingAddress);
session.setAddress(msg, sendingAddress); } else { msg.setAddress(sendingAddress);
session.setAddress(msg, sendingAddress); } else { msg.setAddress(sendingAddress);
session.setAddress(msg, sendingAddress); } else { msg.setAddress(sendingAddress);
session.setAddress(msg, sendingAddress); } else { msg.setAddress(sendingAddress);
result.getInnerMessage().setDurable(message.isDurable()); result.getInnerMessage().setPriority(message.getPriority()); result.getInnerMessage().setAddress(message.getAddressSimpleString()); result.encode();
result.getInnerMessage().setDurable(message.isDurable()); result.getInnerMessage().setPriority(message.getPriority()); result.getInnerMessage().setAddress(message.getAddressSimpleString()); result.encode();
final byte priority2 = RandomUtil.randomByte(); message.setAddress(destination); Assert.assertEquals(destination, message.getAddressSimpleString());