org.apache.activemq.command.ActiveMQMapMessage

Here are the examples of the java api class org.apache.activemq.command.ActiveMQMapMessage taken from open source projects.

1. CompressionOverNetworkTest#testMapMessageCompression()

View license
@Test
public void testMapMessageCompression() throws Exception {
    MessageConsumer consumer1 = remoteSession.createConsumer(included);
    MessageProducer producer = localSession.createProducer(included);
    producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
    waitForConsumerRegistration(localBroker, 1, included);
    MapMessage test = localSession.createMapMessage();
    for (int i = 0; i < 100; ++i) {
        test.setString(Integer.toString(i), "test string: " + i);
    }
    producer.send(test);
    Message msg = consumer1.receive(RECEIVE_TIMEOUT_MILLS);
    assertNotNull(msg);
    ActiveMQMapMessage message = (ActiveMQMapMessage) msg;
    assertTrue(message.isCompressed());
    for (int i = 0; i < 100; ++i) {
        assertEquals("test string: " + i, message.getString(Integer.toString(i)));
    }
}

2. ActiveMQMapMessageTest#createObject()

View license
@Override
public Object createObject() throws Exception {
    ActiveMQMapMessage info = new ActiveMQMapMessage();
    populateObject(info);
    return info;
}

3. ActiveMQMapMessageTest#populateObject()

View license
@Override
protected void populateObject(Object object) throws Exception {
    super.populateObject(object);
    ActiveMQMapMessage info = (ActiveMQMapMessage) object;
}

4. ActiveMQMapMessageTest#createObject()

View license
@Override
public Object createObject() throws Exception {
    ActiveMQMapMessage info = new ActiveMQMapMessage();
    populateObject(info);
    return info;
}

5. ActiveMQMapMessageTest#populateObject()

View license
@Override
protected void populateObject(Object object) throws Exception {
    super.populateObject(object);
    ActiveMQMapMessage info = (ActiveMQMapMessage) object;
}