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

GetSetCmd

public abstract class GetSetCmd extends JMXCmd

Fields Summary
Constructors Summary
protected GetSetCmd(CmdEnv env)

		// disallow instantiation
		super( env );
	
Methods Summary
java.lang.StringgetAttributes()

		// guaranteed to be at least one via getNumRequiredOperands();
		return( getOperands()[ 0 ] );
	
intgetNumRequiredOperands()

		return( 1 );
	
java.lang.String[]getTargets()

		final String []		operands	= getOperands();
		String []	targets	= null;
		
		if ( operands.length == 1 )
		{
			// one operand; that is the attribute list
			// so get attributes on current target
			targets	= getEnvTargets( );
		}
		else
		{
		
			// first operand is attributes, subsequent are the targets
			targets	= new String [ operands.length - 1 ];
			
			for( int i = 0; i < targets.length; ++i )
			{
				targets[ i ]	= operands[ i + 1 ];
			}
		}
		
		return( targets );