1 22 package org.jboss.management.j2ee.statistics; 23 24 import javax.management.j2ee.statistics.CountStatistic ; 25 import javax.management.j2ee.statistics.EJBStats ; 26 27 33 public abstract class EJBStatsImpl extends StatsBase 34 implements EJBStats 35 { 36 38 39 private static final long serialVersionUID = 4277191366915058098L; 40 41 43 public EJBStatsImpl() 44 { 45 this(new CountStatisticImpl("CreateCount", "1", "Number of creates"), 46 new CountStatisticImpl("RemoveCount", "1", "Number of removes")); 47 } 48 49 public EJBStatsImpl(CountStatistic createCount, CountStatistic removeCount) 50 { 51 addStatistic("CreateCount", createCount); 52 addStatistic("RemoveCount", removeCount); 53 } 54 55 public CountStatistic getCreateCount() 57 { 58 return (CountStatistic ) getStatistic("CreateCount"); 59 } 60 61 public CountStatistic getRemoveCount() 62 { 63 return (CountStatistic ) getStatistic("RemoveCount"); 64 } 65 } 67 | Popular Tags |