Package org.hornetq.utils.json

Examples of org.hornetq.utils.json.JSONObject.optString()


      SubscriptionInfo[] infos = new SubscriptionInfo[array.length()];
      for (int i = 0; i < array.length(); i++)
      {
         JSONObject sub = array.getJSONObject(i);
         SubscriptionInfo info = new SubscriptionInfo(sub.getString("queueName"),
                                                      sub.optString("clientID", null),
                                                      sub.optString("name", null),
                                                      sub.getBoolean("durable"),
                                                      sub.optString("selector", null),
                                                      sub.getInt("messageCount"));
         infos[i] = info;
View Full Code Here


      for (int i = 0; i < array.length(); i++)
      {
         JSONObject sub = array.getJSONObject(i);
         SubscriptionInfo info = new SubscriptionInfo(sub.getString("queueName"),
                                                      sub.optString("clientID", null),
                                                      sub.optString("name", null),
                                                      sub.getBoolean("durable"),
                                                      sub.optString("selector", null),
                                                      sub.getInt("messageCount"));
         infos[i] = info;
      }
View Full Code Here

         JSONObject sub = array.getJSONObject(i);
         SubscriptionInfo info = new SubscriptionInfo(sub.getString("queueName"),
                                                      sub.optString("clientID", null),
                                                      sub.optString("name", null),
                                                      sub.getBoolean("durable"),
                                                      sub.optString("selector", null),
                                                      sub.getInt("messageCount"));
         infos[i] = info;
      }

      return infos;
View Full Code Here

      String jsonString = serverControl.getConnectorsAsJSON();
      Assert.assertNotNull(jsonString);
      JSONArray array = new JSONArray(jsonString);
      Assert.assertEquals(1, array.length());
      JSONObject data = array.getJSONObject(0);
      Assert.assertEquals(connectorConfig.getName(), data.optString("name"));
      Assert.assertEquals(connectorConfig.getFactoryClassName(), data.optString("factoryClassName"));
      Assert.assertEquals(connectorConfig.getParams().size(), data.getJSONObject("params").length());
   }

   public void testCreateAndDestroyQueue() throws Exception
View Full Code Here

      Assert.assertNotNull(jsonString);
      JSONArray array = new JSONArray(jsonString);
      Assert.assertEquals(1, array.length());
      JSONObject data = array.getJSONObject(0);
      Assert.assertEquals(connectorConfig.getName(), data.optString("name"));
      Assert.assertEquals(connectorConfig.getFactoryClassName(), data.optString("factoryClassName"));
      Assert.assertEquals(connectorConfig.getParams().size(), data.getJSONObject("params").length());
   }

   public void testCreateAndDestroyQueue() throws Exception
   {
View Full Code Here

      SubscriptionInfo[] infos = new SubscriptionInfo[array.length()];
      for (int i = 0; i < array.length(); i++)
      {
         JSONObject sub = array.getJSONObject(i);
         SubscriptionInfo info = new SubscriptionInfo(sub.getString("queueName"),
                                                      sub.optString("clientID", null),
                                                      sub.optString("name", null),
                                                      sub.getBoolean("durable"),
                                                      sub.optString("selector", null),
                                                      sub.getInt("messageCount"),
                                                      sub.getInt("deliveringCount"));
View Full Code Here

      for (int i = 0; i < array.length(); i++)
      {
         JSONObject sub = array.getJSONObject(i);
         SubscriptionInfo info = new SubscriptionInfo(sub.getString("queueName"),
                                                      sub.optString("clientID", null),
                                                      sub.optString("name", null),
                                                      sub.getBoolean("durable"),
                                                      sub.optString("selector", null),
                                                      sub.getInt("messageCount"),
                                                      sub.getInt("deliveringCount"));
         infos[i] = info;
View Full Code Here

         JSONObject sub = array.getJSONObject(i);
         SubscriptionInfo info = new SubscriptionInfo(sub.getString("queueName"),
                                                      sub.optString("clientID", null),
                                                      sub.optString("name", null),
                                                      sub.getBoolean("durable"),
                                                      sub.optString("selector", null),
                                                      sub.getInt("messageCount"),
                                                      sub.getInt("deliveringCount"));
         infos[i] = info;
      }
View Full Code Here

                                                    sub.getString("destinationName"),
                                                    sub.getString("destinationType"),
                                                    sub.getBoolean("browseOnly"),
                                                    sub.getLong("creationTime"),
                                                    sub.getBoolean("durable"),
                                                    sub.optString("filter", null));
         infos[i] = info;
      }

      return infos;
   }
View Full Code Here

      String jsonString = serverControl.getConnectorsAsJSON();
      Assert.assertNotNull(jsonString);
      JSONArray array = new JSONArray(jsonString);
      Assert.assertEquals(1, array.length());
      JSONObject data = array.getJSONObject(0);
      Assert.assertEquals(connectorConfig.getName(), data.optString("name"));
      Assert.assertEquals(connectorConfig.getFactoryClassName(), data.optString("factoryClassName"));
      Assert.assertEquals(connectorConfig.getParams().size(), data.getJSONObject("params").length());
   }

   public void testCreateAndDestroyQueue() throws Exception
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.