Methods Summary |
---|
void | executeInternal()
final String cmd = getCmdNameAsInvoked();
final String [] targets = getTargets();
if ( targets == null )
{
printError( "No targets have been specified" );
return;
}
establishProxy();
if ( cmd.equalsIgnoreCase( "inspect" ) )
{
handle_inspect( targets );
}
else if ( cmd.equalsIgnoreCase( "ops" ) )
{
handle_ops( targets );
}
else if ( cmd.equalsIgnoreCase( "attrs" ) )
{
handle_attrs( targets );
}
|
public static java.lang.String[] | getNames()
return( new String [] { "inspect", "i", "ops", "attrs" } );
|
int | getNumRequiredOperands()
// require 1, by default
return( 0 );
|
ArgHelper.OptionsInfo | getOptionInfo()
return( new ArgHelperOptionsInfo( OPTIONS_INFO ) );
|
public java.lang.String | getUsage()
return( CmdStrings.INSPECT_HELP.toString() );
|
void | handle_attrs(java.lang.String[] targets)
final InspectRequest request = new InspectRequest( false );
request.attrs = "*";
handle_inspect( targets, request );
|
void | handle_inspect(java.lang.String[] targets, com.sun.cli.jmx.support.InspectRequest request)
final InspectResult [] results = getProxy().mbeanInspect( request, targets );
if ( results.length == 0 )
{
println( "<nothing inspected>" );
}
else
{
final String msg = ArrayStringifier.stringify( results, "\n\n");
println( msg );
}
|
void | handle_inspect(java.lang.String[] targets)
final InspectRequest request = new InspectRequest( true );
request.includeDescription = ! getBoolean( "noDescription", Boolean.TRUE ).booleanValue();
if ( getBoolean( "all", Boolean.FALSE ).booleanValue() )
{
// should already be setup to get everything
}
else
{
request.includeSummary = getBoolean( "summary", Boolean.TRUE ).booleanValue();
request.constructors = getBoolean( "constructors", Boolean.FALSE ).booleanValue();
request.attrs = getString( "attributes", null );
request.operations = getString( "operations", null );
request.notifications = getString( "notifications", null );
}
handle_inspect( targets, request );
|
void | handle_ops(java.lang.String[] targets)
final InspectRequest request = new InspectRequest( false );
request.operations = "*";
handle_inspect( targets, request );
|