Here are the examples of the java api class org.apache.activemq.command.ActiveMQObjectMessage taken from open source projects.
1. CompressionOverNetworkTest#testObjectMessageCompression()
Project: activemq-artemis
File: CompressionOverNetworkTest.java
File: CompressionOverNetworkTest.java
@Test public void testObjectMessageCompression() throws Exception { MessageConsumer consumer1 = remoteSession.createConsumer(included); MessageProducer producer = localSession.createProducer(included); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); waitForConsumerRegistration(localBroker, 1, included); StringBuilder payload = new StringBuilder("test-"); for (int i = 0; i < 100; ++i) { payload.append(UUID.randomUUID().toString()); } Message test = localSession.createObjectMessage(payload.toString()); producer.send(test); Message msg = consumer1.receive(RECEIVE_TIMEOUT_MILLS); assertNotNull(msg); ActiveMQObjectMessage message = (ActiveMQObjectMessage) msg; assertTrue(message.isCompressed()); assertEquals(payload.toString(), message.getObject()); }
2. ActiveMQObjectMessageTest#populateObject()
Project: activemq-artemis
File: ActiveMQObjectMessageTest.java
File: ActiveMQObjectMessageTest.java
@Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQObjectMessage info = (ActiveMQObjectMessage) object; }
3. ActiveMQObjectMessageTest#createObject()
Project: activemq-artemis
File: ActiveMQObjectMessageTest.java
File: ActiveMQObjectMessageTest.java
@Override public Object createObject() throws Exception { ActiveMQObjectMessage info = new ActiveMQObjectMessage(); populateObject(info); return info; }
4. ActiveMQObjectMessageTest#populateObject()
Project: activemq-artemis
File: ActiveMQObjectMessageTest.java
File: ActiveMQObjectMessageTest.java
@Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQObjectMessage info = (ActiveMQObjectMessage) object; }
5. ActiveMQObjectMessageTest#createObject()
Project: activemq-artemis
File: ActiveMQObjectMessageTest.java
File: ActiveMQObjectMessageTest.java
@Override public Object createObject() throws Exception { ActiveMQObjectMessage info = new ActiveMQObjectMessage(); populateObject(info); return info; }