1 22 package org.jboss.test.jmx.simpleservice; 23 24 import org.jboss.system.ServiceMBeanSupport; 25 26 33 public class SimpleService2 extends ServiceMBeanSupport 34 implements SimpleService2MBean 35 { 36 38 39 private String aString; 40 41 private boolean createCalled; 42 private boolean startCalled; 43 private boolean stopCalled; 44 private boolean destroyCalled; 45 46 48 51 public SimpleService2() 52 { 53 } 55 56 58 public void setAStringAttr(String s) 59 { 60 this.aString = s; 61 } 62 63 public String getAStringAttr() 64 { 65 return aString; 66 } 67 68 public boolean getCreateCalled() 69 { 70 return createCalled; 71 } 72 73 public boolean getStartCalled() 74 { 75 return startCalled; 76 } 77 78 public boolean getStopCalled() 79 { 80 return stopCalled; 81 } 82 83 public boolean getDestroyCalled() 84 { 85 return destroyCalled; 86 } 87 88 90 public void resetLifecycleMemory() 91 { 92 createCalled = false; 93 startCalled = false; 94 stopCalled = false; 95 destroyCalled = false; 96 } 97 98 100 protected void createService() throws Exception 101 { 102 createCalled = true; 103 } 104 105 protected void startService() throws Exception 106 { 107 startCalled = true; 108 } 109 110 protected void stopService() 111 { 112 stopCalled = true; 113 } 114 115 protected void destroyService() 116 { 117 destroyCalled = true; 118 } 119 120 } 121 | Popular Tags |