1 22 package org.jboss.jmx.examples.persistence; 23 24 import java.io.FileDescriptor ; 25 import java.math.BigDecimal ; 26 import java.sql.Timestamp ; 27 import java.util.ArrayList ; 28 29 import org.jboss.system.ServiceMBeanSupport; 30 import org.w3c.dom.Element ; 31 32 43 public class PersistentServiceExample 44 extends ServiceMBeanSupport 45 implements PersistentServiceExampleMBean 46 { 47 49 private boolean someBoolean; 51 private int someInt; 52 53 private Integer someInteger; 55 private BigDecimal someBigDecimal; 56 private String someString; 57 58 private Element someElement; 60 61 private Timestamp someTimestamp; 63 64 private ArrayList someArrayList; 66 67 private FileDescriptor someFileDescriptor; 69 70 private Object someNullObject; 72 73 75 78 public PersistentServiceExample() 79 { 80 super(PersistentServiceExample.class); 81 82 this.someBoolean = true; 83 this.someInt = 666; 84 85 this.someInteger = new Integer (999); 86 this.someBigDecimal = new BigDecimal ("3.14e66"); 87 this.someString = new String ("I've got the devil inside me"); 88 89 this.someElement = null; 90 91 this.someTimestamp = new Timestamp (System.currentTimeMillis()); 92 93 this.someArrayList = new ArrayList (); 94 this.someArrayList.add(new FileDescriptor ()); 95 96 this.someFileDescriptor = new FileDescriptor (); 97 98 this.someNullObject = null; 99 } 100 101 103 107 public BigDecimal getSomeBigDecimal() { 108 return someBigDecimal; 109 } 110 111 115 public void setSomeBigDecimal(BigDecimal someBigDecimal) { 116 this.someBigDecimal = someBigDecimal; 117 } 118 119 123 public boolean isSomeBoolean() { 124 return someBoolean; 125 } 126 127 131 public void setSomeBoolean(boolean someBoolean) { 132 this.someBoolean = someBoolean; 133 } 134 135 139 public Element getSomeElement() { 140 return someElement; 141 } 142 143 147 public void setSomeElement(Element someElement) { 148 this.someElement = someElement; 149 } 150 151 155 public FileDescriptor getSomeFileDescriptor() { 156 return someFileDescriptor; 157 } 158 159 163 public void setSomeFileDescriptor(FileDescriptor someFileDescriptor) { 164 this.someFileDescriptor = someFileDescriptor; 165 } 166 167 171 public int getSomeInt() { 172 return someInt; 173 } 174 175 179 public void setSomeInt(int someInt) { 180 this.someInt = someInt; 181 } 182 183 187 public Integer getSomeInteger() { 188 return someInteger; 189 } 190 191 195 public void setSomeInteger(Integer someInteger) { 196 this.someInteger = someInteger; 197 } 198 199 203 public String getSomeString() { 204 return someString; 205 } 206 207 211 public void setSomeString(String someString) { 212 this.someString = someString; 213 } 214 215 219 public Timestamp getSomeTimestamp() { 220 someTimestamp = new Timestamp (System.currentTimeMillis()); 221 return someTimestamp; 222 } 223 224 228 public void setSomeTimestamp(Timestamp someTimestamp) { 229 this.someTimestamp = someTimestamp; 230 } 231 232 236 public Object getSomeNullObject() { 237 return someNullObject; 238 } 239 240 244 public void setSomeNullObject(Object someNullObject) { 245 } 247 248 252 public ArrayList getSomeArrayList() { 253 return someArrayList; 254 } 255 256 260 public void setSomeArrayList(ArrayList someArrayList) { 261 this.someArrayList = someArrayList; 262 } 263 } | Popular Tags |