FileDocCategorySizeDatePackage
StatsStringifier.javaAPI DocGlassfish v2 API3121Fri May 04 22:31:04 BST 2007com.sun.appserv.management.util.j2ee.stringifier

StatsStringifier

public class StatsStringifier extends Object implements com.sun.appserv.management.util.stringifier.Stringifier
Stringifier for javax.management.j2ee.statistics

Fields Summary
public static final StatsStringifier
DEFAULT
Constructors Summary
public StatsStringifier()

	
		
	 
	
	
Methods Summary
public java.lang.Stringstringify(java.lang.Object o)

		final Stats			stats	= (Stats)o;
		final String []		names	= stats.getStatisticNames();
		
		Arrays.sort( names );
		
		final StringBuffer	buf	= new StringBuffer();
		
		buf.append( "Stats: " + ArrayStringifier.stringify( names, ", " ) + "\n" );
		
		for( int i = 0; i < names.length; ++i )
		{
			final Object	statistic	= stats.getStatistic( names[ i ] );
			
			buf.append( SmartStringifier.toString( statistic ) );
			buf.append( "---\n" );
		}
		buf.append( "\n" );
		
		return( buf.toString() );