1 8 9 package mx4j.tools.jython; 10 11 import java.lang.reflect.Method ; 12 13 import mx4j.MBeanDescriptionAdapter; 14 15 20 public class JythonRunnerMBeanDescription extends MBeanDescriptionAdapter 21 { 22 public String getMBeanDescription() 23 { 24 return "Runs a jython script for management purposes"; 25 } 26 27 public String getAttributeDescription(String attribute) 28 { 29 if (attribute.equals("NotificationType")) 30 { 31 return "The Notification type that triggers the script execution"; 32 } 33 if (attribute.equals("ObservedObject")) 34 { 35 return "The ObjectName being observed"; 36 } 37 if (attribute.equals("UseText")) 38 { 39 return "Indicates wether a text based or file based script is used"; 40 } 41 if (attribute.equals("Script")) 42 { 43 return "The script text"; 44 } 45 if (attribute.equals("ScriptURL")) 46 { 47 return "The script's URL"; 48 } 49 if (attribute.equals("CacheScript")) 50 { 51 return "Indicates whether the script is read every time or only once"; 52 } 53 return super.getAttributeDescription(attribute); 54 } 55 56 public String getOperationDescription(Method operation) 57 { 58 String name = operation.getName(); 59 if (name.equals("runScript")) 60 { 61 return "Runs the jython script"; 62 } 63 return super.getOperationDescription(operation); 64 } 65 } 66 | Popular Tags |