public String listMessageCounter() { try { return MessageCounterInfo.toJSon(counter); } catch (Exception e) { throw new IllegalStateException(e); } }
/** * Returns an array of RoleInfo corresponding to the JSON serialization returned * by {@link QueueControl#listMessageCounter()}. */ public static MessageCounterInfo fromJSON(final String jsonString) throws Exception { JSONObject data = new JSONObject(jsonString); String name = data.getString("destinationName"); String subscription = data.getString("destinationSubscription"); boolean durable = data.getBoolean("destinationDurable"); long count = data.getLong("count"); long countDelta = data.getLong("countDelta"); int depth = data.getInt("messageCount"); int depthDelta = data.getInt("messageCountDelta"); String lastAddTimestamp = data.getString("lastAddTimestamp"); String updateTimestamp = data.getString("updateTimestamp"); return new MessageCounterInfo(name, subscription, durable, count, countDelta, depth, depthDelta, lastAddTimestamp, updateTimestamp); }
/** * Returns an array of RoleInfo corresponding to the JSON serialization returned * by {@link QueueControl#listMessageCounter()}. */ public static MessageCounterInfo fromJSON(final String jsonString) throws Exception { JSONObject data = new JSONObject(jsonString); String name = data.getString("destinationName"); String subscription = data.getString("destinationSubscription"); boolean durable = data.getBoolean("destinationDurable"); long count = data.getLong("count"); long countDelta = data.getLong("countDelta"); int depth = data.getInt("messageCount"); int depthDelta = data.getInt("messageCountDelta"); String lastAddTimestamp = data.getString("lastAddTimestamp"); String updateTimestamp = data.getString("updateTimestamp"); return new MessageCounterInfo(name, subscription, durable, count, countDelta, depth, depthDelta, lastAddTimestamp, updateTimestamp); }
public String listMessageCounter() { checkStarted(); clearIO(); try { return MessageCounterInfo.toJSon(counter); } catch (Exception e) { throw new IllegalStateException(e); } finally { blockOnIO(); } }
public String listMessageCounter() { checkStarted(); clearIO(); try { return MessageCounterInfo.toJSon(counter); } catch (Exception e) { throw new IllegalStateException(e); } finally { blockOnIO(); } }