Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
SimplePrinter |
|
| 1.6666666666666667;1.667 |
1 | /* | |
2 | * $Id: SimplePrinter.java 7976 2007-08-21 14:26:13Z dirk.olmes $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com | |
5 | * | |
6 | * The software in this package is published under the terms of the CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
10 | ||
11 | package org.mule.management.stats.printers; | |
12 | ||
13 | import java.io.OutputStream; | |
14 | import java.io.Writer; | |
15 | import java.util.Collection; | |
16 | ||
17 | /** | |
18 | * <code>SimplePrinter</code> Default stats printer | |
19 | * | |
20 | * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a> | |
21 | * @version $Revision: 7976 $ | |
22 | */ | |
23 | public class SimplePrinter extends AbstractTablePrinter | |
24 | { | |
25 | public SimplePrinter(Writer out) | |
26 | { | |
27 | 0 | super(out); |
28 | 0 | } |
29 | ||
30 | public SimplePrinter(OutputStream out) | |
31 | { | |
32 | 0 | super(out); |
33 | 0 | } |
34 | ||
35 | public void print(Collection stats) | |
36 | { | |
37 | 0 | String[][] table = getTable(stats); |
38 | 0 | for (int i = 1; i < table.length; i++) |
39 | { | |
40 | 0 | println(); |
41 | 0 | println("---- Component Statistics ----"); |
42 | 0 | for (int j = 0; j < table[0].length; j++) |
43 | { | |
44 | 0 | println(table[0][j] + ": " + table[i][j]); |
45 | } | |
46 | 0 | println("---- End Component Statistics ----"); |
47 | } | |
48 | 0 | } |
49 | } |