FileDocCategorySizeDatePackage
CountCmd.javaAPI DocGlassfish v2 API3291Fri May 04 22:24:50 BST 2007com.sun.cli.jmx.cmd

CountCmd

public class CountCmd extends JMXCmd

Fields Summary
private static final String
OPTIONS_INFO
static final String
NAME
Constructors Summary
public CountCmd(CmdEnv env)

		super( env );
	
Methods Summary
voidexecuteInternal()

		final String [] operands	= getOperands();
		
		if ( operands.length != 0 )
		{
			final String	msg	= "No arguments required";
			printError( msg  );
			throw new IllegalArgumentException( msg );
		}
		
		try
		{
			establishProxy();
			final int numMBeans	= getProxy().mbeanCount();
			println( "" + numMBeans );
		}
		catch( Exception e )
		{	
			dm( e.getMessage() );
			e.printStackTrace();
		}
	
public static java.lang.String[]getNames()

	
		   
	 
	
		return( new String [] { NAME } );
	
intgetNumRequiredOperands()

		return( 0 );
	
ArgHelper.OptionsInfogetOptionInfo()

	
		
	
		 
	
		return( new ArgHelperOptionsInfo( OPTIONS_INFO ) );
	
public java.lang.StringgetUsage()

		return( CmdStrings.COUNT_HELP.toString() );