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