Package org.jboss.resource.statistic.formatter

Examples of org.jboss.resource.statistic.formatter.StatisticsFormatter


   public Object listFormattedSubPoolStatistics(String formatClassName)
   {
      final JBossStatistics stats = (JBossStatistics)listStatistics();
      final ClassLoader cl = Thread.currentThread().getContextClassLoader();
      Class clazz;
      StatisticsFormatter formatter = null;
     
      try
      {
         clazz = cl.loadClass(formatClassName);
         formatter = (StatisticsFormatter)clazz.newInstance();
      }
      catch (Exception e)
      {
         log.warn("warn: statistics formatter not found, setting to " + statisticsFormatter);
         formatter = new JBossDefaultSubPoolStatisticFormatter();
        
      }
  
      return formatter.formatStatistics(stats);     
   }
View Full Code Here


      assertTrue(formattedStats instanceof String);
     
      //Do a diff
      Object rawStatistics = StatisticsHelper.listRawStatistics(getServer());
     
      StatisticsFormatter defaultFormatter = StatisticsHelper.getDefaultFormatter();
     
      ManagedConnectionPoolStatistics stats = (ManagedConnectionPoolStatistics)rawStatistics;
     
      String rawFormat = (String)defaultFormatter.formatStatistics((JBossStatistics)stats);
     
      assertEquals(formattedStats, rawFormat);
     
      conn.close();
   }
View Full Code Here

      assertTrue(formattedStats instanceof String);
     
      //Do a diff
      Object rawStatistics = StatisticsHelper.listRawStatistics(getServer());
     
      StatisticsFormatter defaultFormatter = StatisticsHelper.getDefaultFormatter();
     
      ManagedConnectionPoolStatistics stats = (ManagedConnectionPoolStatistics)rawStatistics;
     
      String rawFormat = (String)defaultFormatter.formatStatistics((JBossStatistics)stats);
     
      assertEquals(formattedStats, rawFormat);
     
      conn.close();
   }
View Full Code Here

   public Object listFormattedSubPoolStatistics(String formatClassName)
   {
      final JBossStatistics stats = (JBossStatistics)listStatistics();
      final ClassLoader cl = Thread.currentThread().getContextClassLoader();
      Class clazz;
      StatisticsFormatter formatter = null;
     
      try
      {
         clazz = cl.loadClass(formatClassName);
         formatter = (StatisticsFormatter)clazz.newInstance();
      }
      catch (Exception e)
      {
         log.warn("warn: statistics formatter not found, setting to " + statisticsFormatter);
         formatter = new JBossDefaultSubPoolStatisticFormatter();
        
      }
  
      return formatter.formatStatistics(stats);     
   }
View Full Code Here

/*      */   public Object listFormattedSubPoolStatistics(String formatClassName)
/*      */   {
/*  117 */     JBossStatistics stats = (JBossStatistics)listStatistics();
/*  118 */     ClassLoader cl = Thread.currentThread().getContextClassLoader();
/*      */
/*  120 */     StatisticsFormatter formatter = null;
/*      */     try
/*      */     {
/*  124 */       Class clazz = cl.loadClass(formatClassName);
/*  125 */       formatter = (StatisticsFormatter)clazz.newInstance();
/*      */     }
/*      */     catch (Exception e)
/*      */     {
/*  129 */       log.warn("warn: statistics formatter not found, setting to " + this.statisticsFormatter);
/*  130 */       formatter = new JBossDefaultSubPoolStatisticFormatter();
/*      */     }
/*      */
/*  134 */     return formatter.formatStatistics(stats);
/*      */   }
View Full Code Here

TOP

Related Classes of org.jboss.resource.statistic.formatter.StatisticsFormatter

Copyright © 2018 www.massapicom. 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.