1 23 24 29 30 31 package com.sun.cli.jmx.support; 32 33 import javax.management.ObjectName ; 34 import javax.management.NotificationListener ; 35 import javax.management.NotificationFilter ; 36 import javax.management.MBeanServerConnection ; 37 import javax.management.MBeanServerInvocationHandler ; 38 39 import com.sun.cli.jmx.support.AliasMgrHashMapImpl; 40 import com.sun.cli.jmx.support.AliasMgr; 41 42 43 48 public class CLISupportMBeanProxy implements CLISupportMBean, AliasMgrMBean 49 { 50 final AliasMgrMBean mAliasMgrProxy; 51 final CLISupportMBean mCLIProxy; 52 53 75 76 79 public 80 CLISupportMBeanProxy( 81 AliasMgrMBean aliasMgr, 82 CLISupportMBean cliSupport ) throws Exception 83 { 84 mAliasMgrProxy = aliasMgr; 85 mCLIProxy = cliSupport; 86 } 87 88 89 90 92 public ResultsForGetSet [] 93 mbeanGet( String attrs, String [] targets) throws Exception 94 { 95 return( mCLIProxy.mbeanGet( attrs, targets ) ); 96 } 97 98 public ResultsForGetSet [] 99 mbeanSet( String attrs, String [] targets ) throws Exception 100 { 101 return( mCLIProxy.mbeanSet( attrs, targets ) ); 102 } 103 104 public InvokeResult [] 105 mbeanInvoke( 106 String operation, 107 String args, 108 String [] targets ) throws Exception 109 { 110 return( mCLIProxy.mbeanInvoke( operation, args, targets ) ); 111 } 112 113 public InvokeResult [] 114 mbeanInvoke( 115 String operation, 116 String [] targets ) throws Exception 117 { 118 return( mbeanInvoke( operation, null, targets ) ); 119 } 120 121 122 public ObjectName [] 123 mbeanFind( String [] targets ) 124 throws Exception 125 { 126 return( mCLIProxy.mbeanFind( targets ) ); 127 } 128 129 public ObjectName [] 130 mbeanFind( String target ) 131 throws Exception 132 { 133 return( mbeanFind( new String [] { target } )); 134 } 135 136 public ObjectName [] 137 mbeanFind( String [] targets, String regex) 138 throws Exception 139 { 140 return( mCLIProxy.mbeanFind( targets, regex ) ); 141 } 142 143 144 public InspectResult 145 mbeanInspect( InspectRequest request, ObjectName name ) throws Exception 146 { 147 return( mCLIProxy.mbeanInspect( request, name ) ); 148 } 149 150 public InspectResult [] 151 mbeanInspect( InspectRequest request, String [] targets ) throws Exception 152 { 153 return( mCLIProxy.mbeanInspect( request, targets ) ); 154 } 155 156 public void 157 mbeanCreate( String name, String theClass, String args ) throws Exception 158 { 159 mCLIProxy.mbeanCreate( name, theClass, args ); 160 } 161 162 public void 163 mbeanUnregister( String name ) throws Exception 164 { 165 mCLIProxy.mbeanUnregister( name ); 166 } 167 168 public int 169 mbeanCount( ) throws Exception 170 { 171 return( mCLIProxy.mbeanCount( ) ); 172 } 173 174 public String [] 175 mbeanDomains( ) throws Exception 176 { 177 return( mCLIProxy.mbeanDomains( ) ); 178 } 179 180 public void 181 mbeanListen( 182 boolean start, 183 String [] targets, 184 NotificationListener listener, 185 NotificationFilter filter, 186 Object handback ) throws Exception 187 { 188 mCLIProxy.mbeanListen( start, targets, listener, filter, handback ); 189 } 190 191 192 public ObjectName [] 193 resolveTargets( String [] targets ) throws Exception 194 { 195 return( mCLIProxy.resolveTargets( targets ) ); 196 } 197 198 199 201 202 public void 203 createAlias( String aliasName, String objectName ) throws Exception 204 { 205 mAliasMgrProxy.createAlias( aliasName, objectName ); 206 } 207 208 public void 209 deleteAlias( String aliasName ) throws Exception 210 { 211 mAliasMgrProxy.deleteAlias( aliasName ); 212 } 213 214 public String 215 resolveAlias( String aliasName ) throws Exception 216 { 217 return( (String )mAliasMgrProxy.resolveAlias( aliasName ) ); 218 } 219 220 public String [] 221 listAliases( boolean showValues ) throws Exception 222 { 223 return( mAliasMgrProxy.listAliases( showValues ) ); 224 } 225 226 public String [] 227 getAliases( ) throws Exception 228 { 229 return( listAliases( false ) ); 230 } 231 232 public AliasMgrMBean 233 getAliasMgr() 234 { 235 return( mAliasMgrProxy ); 236 } 237 } 238 239 | Popular Tags |