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

ListCmd

public class ListCmd extends JMXCmd

Fields Summary
Constructors Summary
public ListCmd(CmdEnv env)

		super( env );
	
Methods Summary
voidexecuteInternal()

		String [] targets	= getTargets();
		
		if ( targets.length == 0 )
		{
			targets	= ALL_TARGET;
		}
		
		final InvokeResult []	results	= getProxy().mbeanInvoke( "list", "true", targets);
		
		if ( results.length == 0 )
		{
			println( "No objects match the targets " + SmartStringifier.toString( targets ) );
		}
		else
		{
			final InvokeResultIteratorStringifier	s	= new InvokeResultIteratorStringifier( "\n" );
			println( s.stringify( Arrays.asList( results ).iterator() ) );
		}
	
public static java.lang.String[]getNames()

		return( new String [] { "list" } );
	
intgetNumRequiredOperands()

		// require 1, by default
		return( 0 );
	
public java.lang.StringgetUsage()

		return( "no help" );
		//return( CmdStrings.LIST_HELP.toString() );