1 23 24 29 30 package com.sun.cli.jmx.cmd; 31 32 33 import com.sun.cli.jmx.support.ResultsForGetSet; 34 import com.sun.cli.jmx.support.CLISupportMBeanProxy; 35 import com.sun.cli.util.stringifier.*; 36 37 public abstract class GetSetCmd extends JMXCmd 38 { 39 protected 40 GetSetCmd( final CmdEnv env ) 41 { 42 super( env ); 44 } 45 46 int 47 getNumRequiredOperands() 48 { 49 return( 1 ); 50 } 51 52 String 53 getAttributes() 54 { 55 return( getOperands()[ 0 ] ); 57 } 58 59 String [] 60 getTargets() 61 { 62 final String [] operands = getOperands(); 63 String [] targets = null; 64 65 if ( operands.length == 1 ) 66 { 67 targets = getEnvTargets( ); 70 } 71 else 72 { 73 74 targets = new String [ operands.length - 1 ]; 76 77 for( int i = 0; i < targets.length; ++i ) 78 { 79 targets[ i ] = operands[ i + 1 ]; 80 } 81 } 82 83 return( targets ); 84 } 85 } 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | Popular Tags |