Search in sources :

Example 11 with ListToAmqpListConverter

use of org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.ListToAmqpListConverter in project qpid-broker-j by apache.

the class MessageConverter_Internal_to_0_10Test method testListMessageWithoutMimeTypeWithNonJmsContent.

public void testListMessageWithoutMimeTypeWithNonJmsContent() throws Exception {
    ArrayList<?> content = Lists.newArrayList("testItem", 37.5, 42, Lists.newArrayList());
    final ListToAmqpListConverter listToAmqpListConverter = new ListToAmqpListConverter();
    final byte[] expectedContent = listToAmqpListConverter.toMimeContent(content);
    doTest(content, null, expectedContent, listToAmqpListConverter.getMimeType());
}
Also used : ListToAmqpListConverter(org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.ListToAmqpListConverter)

Example 12 with ListToAmqpListConverter

use of org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.ListToAmqpListConverter in project qpid-broker-j by apache.

the class MessageConverter_0_10_to_InternalTest method testConvertAmqpListMessageBody.

public void testConvertAmqpListMessageBody() throws Exception {
    final List<Object> expected = Lists.newArrayList("apple", 43, 31.42D);
    final byte[] messageBytes = new ListToAmqpListConverter().toMimeContent(expected);
    doTestStreamMessage(messageBytes, "amqp/list", expected);
}
Also used : ListToAmqpListConverter(org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.ListToAmqpListConverter)

Aggregations

ListToAmqpListConverter (org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.ListToAmqpListConverter)12 QpidByteBuffer (org.apache.qpid.server.bytebuffer.QpidByteBuffer)4 NamedAddressSpace (org.apache.qpid.server.model.NamedAddressSpace)4 Message_1_0 (org.apache.qpid.server.protocol.v1_0.Message_1_0)4 Binary (org.apache.qpid.server.protocol.v1_0.type.Binary)4 ApplicationProperties (org.apache.qpid.server.protocol.v1_0.type.messaging.ApplicationProperties)4 Data (org.apache.qpid.server.protocol.v1_0.type.messaging.Data)4 Properties (org.apache.qpid.server.protocol.v1_0.type.messaging.Properties)4 MessageTransferMessage (org.apache.qpid.server.protocol.v0_10.MessageTransferMessage)2 AMQMessage (org.apache.qpid.server.protocol.v0_8.AMQMessage)2