/** * Create an instance of {@link QueueORtopicDetails } * */ public QueueORtopicDetails createQueueORtopicDetails() { return new QueueORtopicDetails(); }
QueueORtopicDetails item = new QueueORtopicDetails(); item.setActiveconsumercount(rs.getLong("activeconsumercount")); item.setAgenttype(rs.getString("agenttype")); item.setCanonicalname(rs.getString("canonicalname")); item.setConsumercount(rs.getLong("consumercount")); item.setItemtype(rs.getString("typecol")); item.setMessagecount(rs.getLong("messagecount")); item.setName(rs.getString("namecol")); item.setQueueDepth(rs.getLong("queuedepth")); item.setRecievedmessagecount(rs.getLong("recievedmessagecount")); GregorianCalendar c = new GregorianCalendar(); c.setTimeInMillis(rs.getLong("utcdatetime")); item.setTimestamp((c)); item.setBytesdropped(rs.getLong("bytesdropcount")); item.setBytesin(rs.getLong("bytesin")); item.setBytesout(rs.getLong("bytesout")); item.setMessagesdropped(rs.getLong("messagedropcount")); res.getQueueORtopicDetails().add(item);
rs = com.executeQuery(); while (rs.next()) { QueueORtopicDetails qt = new QueueORtopicDetails(); qt.setActiveconsumercount(rs.getLong("activeconsumercount")); qt.setAgenttype(rs.getString("agenttype")); qt.setBytesdropped(rs.getLong("bytesdropped")); qt.setBytesin(rs.getLong("bytesin")); qt.setBytesout(rs.getLong("bytesout")); qt.setCanonicalname(rs.getString("canonicalname")); qt.setName(rs.getString("namecol")); qt.setQueueDepth(rs.getLong("queuedepth")); qt.setRecievedmessagecount(rs.getLong("reievedmessagecount")); GregorianCalendar cal = new GregorianCalendar(); cal.setTimeInMillis(rs.getLong("utcdatetime")); qt.setTimestamp((cal)); res.getHistoricalTopicQueueDetails().add(qt);
public Object produceDataset(Map params) throws DatasetProduceException { DefaultCategoryDataset data = new DefaultCategoryDataset(); try{ GetCurrentBrokerDetailsResponseMsg res = (GetCurrentBrokerDetailsResponseMsg) params.get("fgsms.data"); for (int i = 0; i < res.getQueueORtopicDetails().size(); i++) { if (res.getQueueORtopicDetails().get(i).getItemtype().equalsIgnoreCase("queue")) { //data.addValue(set.stuff.get(i).success, set.stuff.get(i).action + " Success", set.stuff.get(i).action); long k = res.getQueueORtopicDetails().get(i).getQueueDepth(); // k = (long) (Math.random() * 100); data.addValue( k,res.getQueueORtopicDetails().get(i).getCanonicalname(),res.getQueueORtopicDetails().get(i).getCanonicalname()); } } } catch (Exception ex) { LogHelper.getLog().log(Level.WARN, "error building chart for message broker queue depth", ex); } return data; }