org.hornetq.api.core.management
Class DayCounterInfo

java.lang.Object
  extended by org.hornetq.api.core.management.DayCounterInfo

public class DayCounterInfo
extends Object

Helper class to create Java Objects from the JSON serialization returned by QueueControl.listMessageCounterHistory().

Author:
Jeff Mesnil

Constructor Summary
DayCounterInfo(String date, int[] counters)
           
 
Method Summary
static DayCounterInfo[] fromJSON(String jsonString)
          Returns an array of RoleInfo corresponding to the JSON serialization returned by QueueControl.listMessageCounterHistory().
 int[] getCounters()
          Returns a 24-length array corresponding to the number of messages added to the queue for the given hour of the day.
 String getDate()
          Returns the date of the counter.
static String toJSON(DayCounterInfo[] infos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DayCounterInfo

public DayCounterInfo(String date,
                      int[] counters)
Method Detail

toJSON

public static String toJSON(DayCounterInfo[] infos)
                     throws org.hornetq.utils.json.JSONException
Throws:
org.hornetq.utils.json.JSONException

fromJSON

public static DayCounterInfo[] fromJSON(String jsonString)
                                 throws org.hornetq.utils.json.JSONException
Returns an array of RoleInfo corresponding to the JSON serialization returned by QueueControl.listMessageCounterHistory().

Throws:
org.hornetq.utils.json.JSONException

getDate

public String getDate()
Returns the date of the counter.


getCounters

public int[] getCounters()
Returns a 24-length array corresponding to the number of messages added to the queue for the given hour of the day.



Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.