1
2
3
4
5
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
15
16 public class SimplePrinter extends AbstractTablePrinter
17 {
18 public SimplePrinter(Writer out)
19 {
20 super(out);
21 }
22
23 public SimplePrinter(OutputStream out)
24 {
25 super(out);
26 }
27
28 public void print(Collection stats)
29 {
30 String[][] table = getTable(stats);
31 for (int i = 1; i < table.length; i++)
32 {
33 println();
34 println("---- Service Statistics ----");
35 for (int j = 0; j < table[0].length; j++)
36 {
37 println(table[0][j] + ": " + table[i][j]);
38 }
39 println("---- End Service Statistics ----");
40 }
41 }
42 }