use of org.apache.qpid.server.message.internal.InternalMessageMetaData in project qpid-broker-j by apache.
the class PropertyConverter_Internal_to_v1_0Test method createInternalStoredMessage.
private StoredMessage<InternalMessageMetaData> createInternalStoredMessage(final byte[] content, final boolean persistent, final InternalMessageHeader internalMessageHeader) {
final int contentSize = content == null ? 0 : content.length;
final InternalMessageMetaData metaData = new InternalMessageMetaData(persistent, internalMessageHeader, contentSize);
final StoredMessage<InternalMessageMetaData> storedMessage = mock(StoredMessage.class);
when(storedMessage.getMetaData()).thenReturn(metaData);
when(storedMessage.getContentSize()).thenReturn(contentSize);
return storedMessage;
}
use of org.apache.qpid.server.message.internal.InternalMessageMetaData in project qpid-broker-j by apache.
the class MessageConverter_Internal_to_0_10Test 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.InternalMessageMetaData in project qpid-broker-j by apache.
the class PropertyConverter_Internal_to_v0_10Test method createTestMessage.
private InternalMessage createTestMessage(String to) throws IOException {
final InternalMessageHeader internalMessageHeader = new InternalMessageHeader(mock(AMQMessageHeader.class));
final StoredMessage<InternalMessageMetaData> handle = createInternalStoredMessage(null, false, internalMessageHeader);
return new InternalMessage(handle, internalMessageHeader, null, to);
}
use of org.apache.qpid.server.message.internal.InternalMessageMetaData in project qpid-broker-j by apache.
the class PropertyConverter_Internal_to_v0_8Test method createInternalStoredMessage.
private StoredMessage<InternalMessageMetaData> createInternalStoredMessage(final boolean persistent, final InternalMessageHeader internalMessageHeader, final int contentSize) {
final InternalMessageMetaData metaData = new InternalMessageMetaData(persistent, internalMessageHeader, contentSize);
final StoredMessage<InternalMessageMetaData> storedMessage = mock(StoredMessage.class);
when(storedMessage.getMetaData()).thenReturn(metaData);
when(storedMessage.getContentSize()).thenReturn(contentSize);
return storedMessage;
}
use of org.apache.qpid.server.message.internal.InternalMessageMetaData in project qpid-broker-j by apache.
the class PropertyConverter_Internal_to_v1_0Test method createTestMessage.
private InternalMessage createTestMessage(String to) {
final InternalMessageHeader internalMessageHeader = new InternalMessageHeader(mock(AMQMessageHeader.class));
final StoredMessage<InternalMessageMetaData> handle = createInternalStoredMessage(null, false, internalMessageHeader);
return new InternalMessage(handle, internalMessageHeader, null, to);
}
Aggregations