1 23 24 29 30 package com.sun.enterprise.admin.server.core.mbean.test; 31 32 import com.sun.enterprise.admin.server.core.mbean.config.AdminBase; 34 import com.sun.enterprise.admin.server.core.mbean.meta.*; 35 36 import javax.management.*; 37 import com.sun.enterprise.admin.util.*; 38 39 44 public class EasyConfigTestMBean extends AdminBase 45 { 46 public String [] attrs = {"color, java.lang.String, RW, Color of bean", 47 "size, java.lang.String[], RW, Size of bean(array)", 48 "testInt, int, R, Test int value", 49 "testInt3DSArray, int[][][], R, Test int3DArray value", 50 "testInfoArr, javax.management.MBeanAttributeInfo[], R, Test info[] value"} ; 51 public String [] opers = {"setColor(java.lang.String clr Description for string color), ACTION, Test method(setColor)", 52 "emptyParamMethod(), INFO, Test empty param-list methodemptyParamMethod", 53 "testComplexMethod("+ 54 "int intValue Description for intValue ,"+ 55 "int[] intArrayValue Description for intArrayValue,"+ 56 "java.lang.String[][][] str3DArray Description for str3DArray), ACTION_INFO, Test method(testComplexMethod)" 57 }; 58 59 60 public String Smell = null; 61 public String Taste = null; 62 63 66 67 public EasyConfigTestMBean () 68 { 69 } 70 71 public EasyConfigTestMBean(String msg) 72 { 73 } 74 75 public EasyConfigTestMBean(String [] msgs, int testCode) 76 { 77 } 78 79 public MBeanInfo getMBeanInfo() 80 { 81 try { 82 return (new MBeanEasyConfig(getClass(), attrs, opers, "TEST BEAN")).getMBeanInfo(); 83 } catch(Exception e) 84 { 85 System.out.println("++++++++++++++++++++E X C E P T I O N+++++++++++++++++++++++++ getMBeanInfo():Exception:"+e); 86 e.printStackTrace(); 87 return null; 88 } 89 90 } 91 public String getColor() 92 { 93 return "test"; 94 } 95 public void setColor(String c) 96 { 97 } 98 public String getSmell() 99 { 100 return "test"; 101 } 102 103 public boolean testComplexMethod(int intValue, int[] intValue2, String [][][] str) 104 { 105 return false; 106 } 107 108 public void emptyParamMethod() 109 { 110 } 111 119 protected Class getImplementingClass() { 120 return ( this.getClass() ); 121 } 122 123 126 protected Object getImplementingMBean() { 127 return ( this ); 128 } 129 130 } 131 | Popular Tags |