Package org.hornetq.utils.json

Examples of org.hornetq.utils.json.JSONObject$Null


   {
      Map<SimpleString, Pair<UUID, AtomicLong>> targetCopy = cloneTargetAddresses();
     
      for (Map.Entry<SimpleString, Pair<UUID, AtomicLong>> entry : targetCopy.entrySet())
      {
         JSONObject producerInfo = new JSONObject();
         producerInfo.put("connectionID", this.getConnectionID().toString());
         producerInfo.put("sessionID", this.getName());
         producerInfo.put("destination", entry.getKey().toString());
         producerInfo.put("lastUUIDSent", entry.getValue().a);
         producerInfo.put("msgSent", entry.getValue().b.longValue());
         array.put(producerInfo);
      }
   }
View Full Code Here


   private static JSONArray toJSONMsgArray(final Map<String, Object>[] messages)
   {
      JSONArray array = new JSONArray();
      for (Map<String, Object> message : messages)
      {
         array.put(new JSONObject(message));
      }
      return array;
   }
View Full Code Here

      try
      {
         JSONArray arrayReturn = new JSONArray();
         for (Map.Entry<String, Map<String, Object>[]> entry: messages.entrySet())
         {
            JSONObject objectItem = new JSONObject();
            objectItem.put("consumerName", entry.getKey());
            objectItem.put("elements", toJSONMsgArray(entry.getValue()));
            arrayReturn.put(objectItem);
         }

         return arrayReturn.toString();
      }
View Full Code Here

            if (consumer instanceof ServerConsumer)
            {
               ServerConsumer serverConsumer = (ServerConsumer)consumer;

               JSONObject obj = new JSONObject();
               obj.put("consumerID", serverConsumer.getID());
               obj.put("connectionID", serverConsumer.getConnectionID().toString());
               obj.put("sessionID", serverConsumer.getSessionID());
               obj.put("browseOnly", serverConsumer.isBrowseOnly());
               obj.put("creationTime", serverConsumer.getCreationTime());

               jsonArray.put(obj);
            }

         }
View Full Code Here

   {
      Map<SimpleString, Pair<UUID, AtomicLong>> targetCopy = cloneTargetAddresses();

      for (Map.Entry<SimpleString, Pair<UUID, AtomicLong>> entry : targetCopy.entrySet())
      {
         JSONObject producerInfo = new JSONObject();
         producerInfo.put("connectionID", this.getConnectionID().toString());
         producerInfo.put("sessionID", this.getName());
         producerInfo.put("destination", entry.getKey().toString());
         producerInfo.put("lastUUIDSent", entry.getValue().getA());
         producerInfo.put("msgSent", entry.getValue().getB().longValue());
         array.put(producerInfo);
      }
   }
View Full Code Here

   {
      Map<SimpleString, Pair<UUID, AtomicLong>> targetCopy = cloneTargetAddresses();

      for (Map.Entry<SimpleString, Pair<UUID, AtomicLong>> entry : targetCopy.entrySet())
      {
         JSONObject producerInfo = new JSONObject();
         producerInfo.put("connectionID", this.getConnectionID().toString());
         producerInfo.put("sessionID", this.getName());
         producerInfo.put("destination", entry.getKey().toString());
         producerInfo.put("lastUUIDSent", entry.getValue().getA());
         producerInfo.put("msgSent", entry.getValue().getB().longValue());
         array.put(producerInfo);
      }
   }
View Full Code Here

    private static JSONArray toJSONMsgArray(final Map<String, Object>[] messages)
    {
        JSONArray array = new JSONArray();
        for (Map<String, Object> message : messages)
        {
            array.put(new JSONObject(message));
        }
        return array;
    }
View Full Code Here

        try
        {
            JSONArray arrayReturn = new JSONArray();
            for (Map.Entry<String, Map<String, Object>[]> entry: messages.entrySet())
            {
                JSONObject objectItem = new JSONObject();
                objectItem.put("consumerName", entry.getKey());
                objectItem.put("elements", toJSONMsgArray(entry.getValue()));
                arrayReturn.put(objectItem);
            }

            return arrayReturn.toString();
        }
View Full Code Here

            if (consumer instanceof ServerConsumer)
            {
               ServerConsumer serverConsumer = (ServerConsumer)consumer;

               JSONObject obj = new JSONObject();
               obj.put("consumerID", serverConsumer.getID());
               obj.put("connectionID", serverConsumer.getConnectionID().toString());
               obj.put("sessionID", serverConsumer.getSessionID());
               obj.put("browseOnly", serverConsumer.isBrowseOnly());
               obj.put("creationTime", serverConsumer.getCreationTime());

               jsonArray.put(obj);
            }

         }
View Full Code Here

         JSONArray json = new JSONArray();
         Set<Role> roles = securityRepository.getMatch(address.toString());

         for (Role role : roles)
         {
            json.put(new JSONObject(role));
         }
         return json.toString();
      }
      finally
      {
View Full Code Here

TOP

Related Classes of org.hornetq.utils.json.JSONObject$Null

Copyright © 2018 www.massapicom. 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.