use of org.apache.qpid.server.message.internal.InternalMessageHeader in project qpid-broker-j by apache.
the class PropertyConverter_Internal_to_v0_8Test method createTestMessage.
private InternalMessage createTestMessage(String to) {
final InternalMessageHeader internalMessageHeader = new InternalMessageHeader(mock(AMQMessageHeader.class));
final StoredMessage<InternalMessageMetaData> handle = createInternalStoredMessage(false, internalMessageHeader, 0);
return new InternalMessage(handle, internalMessageHeader, null, to);
}
use of org.apache.qpid.server.message.internal.InternalMessageHeader in project qpid-broker-j by apache.
the class VirtualHostPropertiesNode method createMessage.
protected InternalMessage createMessage() {
Map<String, Object> headers = new HashMap<>();
final List<String> globalAddressDomains = _addressSpace.getGlobalAddressDomains();
if (globalAddressDomains != null && !globalAddressDomains.isEmpty()) {
String primaryDomain = globalAddressDomains.get(0);
if (primaryDomain != null) {
primaryDomain = primaryDomain.trim();
if (!primaryDomain.endsWith("/")) {
primaryDomain += "/";
}
headers.put("virtualHost.temporaryQueuePrefix", primaryDomain);
}
}
InternalMessageHeader header = new InternalMessageHeader(headers, null, 0l, null, null, UUID.randomUUID().toString(), null, null, (byte) 4, System.currentTimeMillis(), 0L, null, null, System.currentTimeMillis());
final InternalMessage message = InternalMessage.createBytesMessage(_addressSpace.getMessageStore(), header, new byte[0]);
message.setInitialRoutingAddress(getName());
return message;
}
Aggregations