Coverage Report - org.mule.management.stats.printers.SimplePrinter
 
Classes in this File Line Coverage Branch Coverage Complexity
SimplePrinter
0%
0/12
0%
0/4
1.667
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.management.stats.printers;
 8  
 
 9  
 import java.io.OutputStream;
 10  
 import java.io.Writer;
 11  
 import java.util.Collection;
 12  
 
 13  
 /**
 14  
  * <code>SimplePrinter</code> Default stats printer
 15  
  */
 16  
 public class SimplePrinter extends AbstractTablePrinter
 17  
 {
 18  
     public SimplePrinter(Writer out)
 19  
     {
 20  0
         super(out);
 21  0
     }
 22  
 
 23  
     public SimplePrinter(OutputStream out)
 24  
     {
 25  0
         super(out);
 26  0
     }
 27  
 
 28  
     public void print(Collection stats)
 29  
     {
 30  0
         String[][] table = getTable(stats);
 31  0
         for (int i = 1; i < table.length; i++)
 32  
         {
 33  0
             println();
 34  0
             println("---- Service Statistics ----");
 35  0
             for (int j = 0; j < table[0].length; j++)
 36  
             {
 37  0
                 println(table[0][j] + ": " + table[i][j]);
 38  
             }
 39  0
             println("---- End Service Statistics ----");
 40  
         }
 41  0
     }
 42  
 }