1 package org.oddjob.jmx.server; 2 3 import javax.management.MBeanAttributeInfo ; 4 import javax.management.MBeanNotificationInfo ; 5 import javax.management.MBeanOperationInfo ; 6 import javax.management.MBeanParameterInfo ; 7 8 import org.oddjob.Resetable; 9 10 12 public class ResetableInfo implements InterfaceInfo { 13 14 public Class interfaceClass() { 15 return Resetable.class; 16 } 17 18 public MBeanAttributeInfo [] getMBeanAttributeInfo() { 19 return new MBeanAttributeInfo [0]; 20 } 21 22 public MBeanOperationInfo [] getMBeanOperationInfo() { 23 return new MBeanOperationInfo [] { 24 new MBeanOperationInfo ("softReset", 25 "Soft Reset the job.", new MBeanParameterInfo [0], Void.TYPE 26 .getName(), MBeanOperationInfo.ACTION), 27 new MBeanOperationInfo ("hardReset", 28 "Hard Reset the job.", new MBeanParameterInfo [0], Void.TYPE 29 .getName(), MBeanOperationInfo.ACTION) 30 }; 31 } 32 33 public MBeanNotificationInfo [] getMBeanNotificationInfo() { 34 return new MBeanNotificationInfo [0]; 35 } 36 37 38 public InterfaceHandler attach(Object target, OddjobMBean ojmb) { 39 return new OperationsHandler(target); 40 } 41 42 } | Popular Tags |