View Javadoc
1 package net.sf.panoptes.model.component.jmx; 2 3 import javax.management.MBeanOperationInfo; 4 import javax.management.MBeanParameterInfo; 5 6 /*** 7 * Operation.java 8 * 9 * Wraps an MBean operation. Original code by Stefan Groschupf(sg@media-style.com). 10 * 11 * @author Dag Liodden 12 * @version 0.1 13 * 14 */ 15 public class Operation { 16 private MBeanOperationInfo OperationInfo; 17 private MBeanComponent mBean; 18 private Object[] params; 19 /*** 20 * Constructor Operation. 21 * @param mBeanOperationInfo 22 */ 23 public Operation(MBeanOperationInfo mBeanOperationInfo, MBeanComponent bean) { 24 setOperationInfo(mBeanOperationInfo); 25 this.mBean = bean; 26 } 27 28 public MBeanParameterInfo[] getParameterInfo() { 29 return OperationInfo.getSignature(); 30 31 } 32 33 /*** 34 * Method setOperationInfo. 35 * @param mBeanOperationInfo 36 */ 37 private void setOperationInfo(MBeanOperationInfo mBeanOperationInfo) { 38 this.OperationInfo = mBeanOperationInfo; 39 } 40 41 public String toString() { 42 return OperationInfo.getName(); 43 } 44 45 public String getName() { 46 return OperationInfo.getName(); 47 } 48 49 /*** 50 * Method getDescription. 51 * @return Object 52 */ 53 private Object getDescription() { 54 return OperationInfo.getDescription(); 55 } 56 57 public String getReturnType() { 58 return OperationInfo.getReturnType(); 59 } 60 61 public void invoke(Object[] args) { 62 Object aobj[] = OperationInfo.getSignature(); 63 String as[] = new String[aobj.length]; 64 for (int i = 0; i < aobj.length; i++) 65 as[i] = aobj[i].toString(); 66 67 //mBean.getParent().getServer().invoke(mBean.getObjectName(), getName(), args, as); 68 69 } 70 71 72 }

This page was automatically generated by Maven