Search in sources :

Example 11 with InternalMessageMetaData

use of org.apache.qpid.server.message.internal.InternalMessageMetaData 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));
}
Also used : InternalMessageMetaData(org.apache.qpid.server.message.internal.InternalMessageMetaData) InternalMessageHeader(org.apache.qpid.server.message.internal.InternalMessageHeader)

Example 12 with InternalMessageMetaData

use of org.apache.qpid.server.message.internal.InternalMessageMetaData 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);
}
Also used : InternalMessage(org.apache.qpid.server.message.internal.InternalMessage) InternalMessageMetaData(org.apache.qpid.server.message.internal.InternalMessageMetaData) InternalMessageHeader(org.apache.qpid.server.message.internal.InternalMessageHeader) AMQMessageHeader(org.apache.qpid.server.message.AMQMessageHeader)

Aggregations

InternalMessageMetaData (org.apache.qpid.server.message.internal.InternalMessageMetaData)12 InternalMessageHeader (org.apache.qpid.server.message.internal.InternalMessageHeader)9 AMQMessageHeader (org.apache.qpid.server.message.AMQMessageHeader)3 InternalMessage (org.apache.qpid.server.message.internal.InternalMessage)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 ObjectOutputStream (java.io.ObjectOutputStream)1