use of org.apache.qpid.server.message.internal.InternalMessageHeader in project qpid-broker-j by apache.
the class PropertyConverter_Internal_to_v1_0Test method createTestMessage.
private InternalMessage createTestMessage(final AMQMessageHeader header, byte[] content, final boolean persistent) {
final InternalMessageHeader internalMessageHeader = new InternalMessageHeader(header);
final StoredMessage<InternalMessageMetaData> storedMessage = createInternalStoredMessage(content, persistent, internalMessageHeader);
return ((InternalMessage) InternalMessageMetaDataType.INSTANCE.createMessage(storedMessage));
}
use of org.apache.qpid.server.message.internal.InternalMessageHeader in project qpid-broker-j by apache.
the class PropertyConverter_Internal_to_v0_10Test method createTestMessage.
private InternalMessage createTestMessage(final AMQMessageHeader header, byte[] content, final boolean persistent, final long arrivalTime) throws IOException {
final InternalMessageHeader internalMessageHeader = new InternalMessageHeader(header, arrivalTime);
final StoredMessage<InternalMessageMetaData> storedMessage = createInternalStoredMessage(content, persistent, internalMessageHeader);
return ((InternalMessage) InternalMessageMetaDataType.INSTANCE.createMessage(storedMessage));
}
use of org.apache.qpid.server.message.internal.InternalMessageHeader in project qpid-broker-j by apache.
the class MessageConverter_Internal_to_1_0Test method getAmqMessage.
protected InternalMessage getAmqMessage(final Serializable content, final String mimeType) throws Exception {
final byte[] serializedContent = getObjectStreamMessageBytes(content);
configureMessageContent(serializedContent);
configureMessageHeader(mimeType);
final InternalMessageHeader internalMessageHeader = new InternalMessageHeader(_amqpHeader);
final int contentSize = serializedContent == null ? 0 : serializedContent.length;
final InternalMessageMetaData metaData = new InternalMessageMetaData(false, internalMessageHeader, contentSize);
when(_handle.getMetaData()).thenReturn(metaData);
return ((InternalMessage) InternalMessageMetaDataType.INSTANCE.createMessage(_handle));
}
use of org.apache.qpid.server.message.internal.InternalMessageHeader in project qpid-broker-j by apache.
the class MessageConverter_Internal_to_0_8Test method getAmqMessage.
protected InternalMessage getAmqMessage(final Serializable content, final String mimeType) throws Exception {
final byte[] serializedContent = getObjectStreamMessageBytes(content);
configureMessageContent(serializedContent);
configureMessageHeader(mimeType);
final InternalMessageHeader internalMessageHeader = new InternalMessageHeader(_amqpHeader);
final int contentSize = serializedContent == null ? 0 : serializedContent.length;
final InternalMessageMetaData metaData = new InternalMessageMetaData(false, internalMessageHeader, contentSize);
when(_handle.getMetaData()).thenReturn(metaData);
return ((InternalMessage) InternalMessageMetaDataType.INSTANCE.createMessage(_handle));
}
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(final AMQMessageHeader header, byte[] content, final boolean persistent) {
final InternalMessageHeader internalMessageHeader = new InternalMessageHeader(header);
final int contentSize = content == null ? 0 : content.length;
final StoredMessage<InternalMessageMetaData> storedMessage = createInternalStoredMessage(persistent, internalMessageHeader, contentSize);
return ((InternalMessage) InternalMessageMetaDataType.INSTANCE.createMessage(storedMessage));
}
Aggregations