Search in sources :

Example 16 with InternalMessageHeader

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

Example 17 with InternalMessageHeader

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

Example 18 with InternalMessageHeader

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

Example 19 with InternalMessageHeader

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

Example 20 with InternalMessageHeader

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

Aggregations

InternalMessageHeader (org.apache.qpid.server.message.internal.InternalMessageHeader)22 InternalMessageMetaData (org.apache.qpid.server.message.internal.InternalMessageMetaData)9 HashMap (java.util.HashMap)7 ConfiguredObject (org.apache.qpid.server.model.ConfiguredObject)7 AbstractConfiguredObject (org.apache.qpid.server.model.AbstractConfiguredObject)6 ManagedObject (org.apache.qpid.server.model.ManagedObject)6 AMQMessageHeader (org.apache.qpid.server.message.AMQMessageHeader)5 InternalMessage (org.apache.qpid.server.message.internal.InternalMessage)5 LinkedHashMap (java.util.LinkedHashMap)4 Map (java.util.Map)3 MessageProperties (org.apache.qpid.server.protocol.v0_10.transport.MessageProperties)2 AccessControlException (java.security.AccessControlException)1 Certificate (java.security.cert.Certificate)1 CertificateEncodingException (java.security.cert.CertificateEncodingException)1 ArrayList (java.util.ArrayList)1 IllegalConfigurationException (org.apache.qpid.server.configuration.IllegalConfigurationException)1 AmqpConnectionMetaData (org.apache.qpid.server.connection.AmqpConnectionMetaData)1 ConfiguredObjectOperation (org.apache.qpid.server.model.ConfiguredObjectOperation)1 IntegrityViolationException (org.apache.qpid.server.model.IntegrityViolationException)1 DeliveryProperties (org.apache.qpid.server.protocol.v0_10.transport.DeliveryProperties)1