1 16 package org.mortbay.util.jmx; 17 18 import javax.management.MBeanException ; 19 import javax.management.MBeanOperationInfo ; 20 21 import org.mortbay.util.LifeCycle; 22 23 24 25 30 public class LifeCycleMBean extends ModelMBeanImpl 31 { 32 33 public LifeCycleMBean() 34 throws MBeanException 35 {} 36 37 38 public LifeCycleMBean(LifeCycle object) 39 throws MBeanException 40 { 41 super(object); 42 } 43 44 45 protected void defineManagedResource() 46 { 47 super.defineManagedResource(); 48 defineAttribute("started"); 49 defineOperation("start",MBeanOperationInfo.ACTION); 50 defineOperation("stop",MBeanOperationInfo.ACTION); 51 } 52 } 53 54 55 56 | Popular Tags |