Examples of listMessagesAsJSON()


Examples of org.hornetq.api.core.management.QueueControl.listMessagesAsJSON()

      ClientProducer producer = session.createProducer(address);
      ClientMessage message = session.createMessage(false);
      message.putIntProperty(new SimpleString("key"), intValue);
      producer.send(message);

      String jsonString = queueControl.listMessagesAsJSON(null);
      Assert.assertNotNull(jsonString);
      JSONArray array = new JSONArray(jsonString);
      Assert.assertEquals(1, array.length());
      Assert.assertEquals(intValue, array.getJSONObject(0).get("key"));
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.listMessagesAsJSON()

      Assert.assertEquals(1, array.length());
      Assert.assertEquals(intValue, array.getJSONObject(0).get("key"));

      ManagementTestBase.consumeMessages(1, session, queue);

      jsonString = queueControl.listMessagesAsJSON(null);
      Assert.assertNotNull(jsonString);
      array = new JSONArray(jsonString);
      Assert.assertEquals(0, array.length());

      session.deleteQueue(queue);
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.listMessagesAsJSON()

      producer.send(matchingMessage);
      ClientMessage unmatchingMessage = session.createMessage(false);
      unmatchingMessage.putLongProperty(key, unmatchingValue);
      producer.send(unmatchingMessage);

      String jsonString = queueControl.listMessagesAsJSON(filter);
      Assert.assertNotNull(jsonString);
      JSONArray array = new JSONArray(jsonString);
      Assert.assertEquals(1, array.length());
      Assert.assertEquals(matchingValue, array.getJSONObject(0).get("key"));
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.listMessagesAsJSON()

      Assert.assertEquals(1, array.length());
      Assert.assertEquals(matchingValue, array.getJSONObject(0).get("key"));

      ManagementTestBase.consumeMessages(2, session, queue);

      jsonString = queueControl.listMessagesAsJSON(filter);
      Assert.assertNotNull(jsonString);
      array = new JSONArray(jsonString);
      Assert.assertEquals(0, array.length());

      session.deleteQueue(queue);
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.listMessagesAsJSON()

      ClientProducer producer = session.createProducer(address);
      ClientMessage message = session.createMessage(false);
      message.putIntProperty(new SimpleString("key"), intValue);
      producer.send(message);

      String jsonString = queueControl.listMessagesAsJSON(null);
      Assert.assertNotNull(jsonString);
      JSONArray array = new JSONArray(jsonString);
      Assert.assertEquals(1, array.length());
      Assert.assertEquals(intValue, array.getJSONObject(0).get("key"));
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.listMessagesAsJSON()

      Assert.assertEquals(1, array.length());
      Assert.assertEquals(intValue, array.getJSONObject(0).get("key"));

      ManagementTestBase.consumeMessages(1, session, queue);

      jsonString = queueControl.listMessagesAsJSON(null);
      Assert.assertNotNull(jsonString);
      array = new JSONArray(jsonString);
      Assert.assertEquals(0, array.length());

      session.deleteQueue(queue);
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.listMessagesAsJSON()

      producer.send(matchingMessage);
      ClientMessage unmatchingMessage = session.createMessage(false);
      unmatchingMessage.putLongProperty(key, unmatchingValue);
      producer.send(unmatchingMessage);

      String jsonString = queueControl.listMessagesAsJSON(filter);
      Assert.assertNotNull(jsonString);
      JSONArray array = new JSONArray(jsonString);
      Assert.assertEquals(1, array.length());
      Assert.assertEquals(matchingValue, array.getJSONObject(0).get("key"));
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.listMessagesAsJSON()

      Assert.assertEquals(1, array.length());
      Assert.assertEquals(matchingValue, array.getJSONObject(0).get("key"));

      ManagementTestBase.consumeMessages(2, session, queue);

      jsonString = queueControl.listMessagesAsJSON(filter);
      Assert.assertNotNull(jsonString);
      array = new JSONArray(jsonString);
      Assert.assertEquals(0, array.length());

      session.deleteQueue(queue);
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.listMessagesAsJSON()

            public QueueControl getDelegate() {
                return control;
            }
            @Override
            public String listMessagesAsJSON(String filter) throws Exception {
                return control.listMessagesAsJSON(filter);
            }

            @Override
            public long countMessages(String filter) throws Exception {
                return control.countMessages(filter);
View Full Code Here

Examples of org.hornetq.api.core.management.QueueControl.listMessagesAsJSON()

      ClientProducer producer = session.createProducer(address);
      ClientMessage message = session.createMessage(false);
      message.putIntProperty(new SimpleString("key"), intValue);
      producer.send(message);

      String jsonString = queueControl.listMessagesAsJSON(null);
      Assert.assertNotNull(jsonString);
      JSONArray array = new JSONArray(jsonString);
      Assert.assertEquals(1, array.length());
      Assert.assertEquals(intValue, array.getJSONObject(0).get("key"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.