Examples of toMap()


Examples of org.hornetq.api.core.Message.toMap()

            // returns just the first, as it's the first only
            if (iterator.hasNext())
            {
               MessageReference ref = iterator.next();
               Message message = ref.getMessage();
               messages.add(message.toMap());
            }
            return toJSON(messages.toArray(new Map[1])).toString();
         }
         finally
         {
View Full Code Here

Examples of org.hornetq.api.core.Message.toMap()

        Map<String, Object>[] messages = new Map[refs.size()];
        int i = 0;
        for (MessageReference ref : refs)
        {
            Message message = ref.getMessage();
            messages[i++] = message.toMap();
        }
        return messages;
    }

View Full Code Here

Examples of org.hornetq.api.core.Message.toMap()

            {
               MessageReference ref = iterator.next();
               if (filter == null || filter.match(ref.getMessage()))
               {
                  Message message = ref.getMessage();
                  messages.add(message.toMap());
               }
            }
            return messages.toArray(new Map[messages.size()]);
         }
         finally
View Full Code Here

Examples of org.hornetq.api.core.Message.toMap()

        Map<String, Object>[] messages = new Map[refs.size()];
        int i = 0;
        for (MessageReference ref : refs)
        {
            Message message = ref.getMessage();
            messages[i++] = message.toMap();
        }
        return messages;
    }

View Full Code Here

Examples of org.hornetq.api.core.Message.toMap()

            {
               MessageReference ref = iterator.next();
               if (filter == null || filter.match(ref.getMessage()))
               {
                  Message message = ref.getMessage();
                  messages.add(message.toMap());
               }
            }
            return messages.toArray(new Map[messages.size()]);
         }
         finally
View Full Code Here

Examples of org.hyperic.sigar.Mem.toMap()

      json.put("loadavg", load);

      // Memory Utilization
      mem = sigar.getMem();
      JSONObject memMap = new JSONObject();
      memMap.putAll(mem.toMap());
      json.put("memory", memMap);
     
      // Network Utilization
      netIf = sigar.getNetInterfaceList();
      JSONArray netInterfaces = new JSONArray();
View Full Code Here

Examples of org.hyperic.sigar.NetInterfaceStat.toMap()

      JSONArray netInterfaces = new JSONArray();
      for (int i = 0; i < netIf.length; i++) {
        NetInterfaceStat net = new NetInterfaceStat();
        net = sigar.getNetInterfaceStat(netIf[i]);
        JSONObject netMap = new JSONObject();
        netMap.putAll(net.toMap());
        if(previousNetworkStats.containsKey(netIf[i])) {
          JSONObject deltaMap = previousNetworkStats.get(netIf[i]);
          deltaMap.put("RxBytes", Long.parseLong(netMap.get("RxBytes").toString()) - Long.parseLong(deltaMap.get("RxBytes").toString()));
          deltaMap.put("RxDropped", Long.parseLong(netMap.get("RxDropped").toString()) - Long.parseLong(deltaMap.get("RxDropped").toString()));
          deltaMap.put("RxErrors", Long.parseLong(netMap.get("RxErrors").toString()) - Long.parseLong(deltaMap.get("RxErrors").toString()));
View Full Code Here

Examples of org.hyperic.sigar.Swap.toMap()

      json.put("memory", memMap);

      // Swap Utilization
      swap = sigar.getSwap();
      JSONObject swapMap = new JSONObject();
      swapMap.putAll(swap.toMap());
      json.put("swap", swapMap);
     
      // Network Utilization
      netIf = sigar.getNetInterfaceList();
      JSONArray netInterfaces = new JSONArray();
View Full Code Here

Examples of org.infoglue.deliver.util.HttpHelper.toMap()

  public List getToolbarButtons(String toolbarKey, String primaryKey, String extraParameters)
  {
    try
    {
      HttpHelper helper = new HttpHelper();
      Map extraParametersMap = helper.toMap(extraParameters, "iso-8859-1", "&");
      Iterator extraParametersMapIterator = extraParametersMap.keySet().iterator();
      while(extraParametersMapIterator.hasNext())
      {
        String key = (String)extraParametersMapIterator.next();
        String value = (String)extraParametersMap.get(key);
View Full Code Here

Examples of org.javalite.activejdbc.test_models.Person.toMap()

    @Test
    public void shouldNotReturnNullAttributesInMap(){
        deleteAndPopulateTable("people");
        Person p = (Person) Person.findAll().get(0);
        a(p.toMap().size()).shouldBeEqual(7);
        p.set("name", null);
        a(p.toMap().size()).shouldBeEqual(6);
    }
}
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.