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 | 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 | |
} |