1 22 package org.jboss.test.jmx.proxy; 23 24 import org.jboss.system.ServiceMBean; 25 import org.jboss.system.ServiceMBeanSupport; 26 27 31 public class ProxyTests 32 extends ServiceMBeanSupport 33 implements ProxyTestsMBean 34 { 35 private TargetMBean proxy; 36 37 public TargetMBean getProxy() 38 { 39 return proxy; 40 } 41 42 public void setProxy(TargetMBean proxy) 43 { 44 this.proxy = proxy; 45 } 46 47 public void startService() 48 throws Exception 49 { 50 if (proxy == null) 51 throw new RuntimeException ("Proxy not started"); 52 53 if (proxy.getState() != ServiceMBean.STARTED) 54 throw new RuntimeException ("Proxy not started"); 55 } 56 } 57 | Popular Tags |