KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tctest > spring > aj > InstrumentedBean


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tctest.spring.aj;
5
6 import org.springframework.beans.factory.InitializingBean;
7
8
9 public class InstrumentedBean implements InitializingBean, IInstrumentedBean {
10
11   private ConfigurableBean configurableBean;
12
13   private String JavaDoc value;
14
15   private transient String JavaDoc transientValue = "aaa";
16
17   
18   public void afterPropertiesSet() throws Exception JavaDoc {
19     this.configurableBean = new ConfigurableBean();
20   }
21   
22   public String JavaDoc getProperty1() {
23     synchronized(this) {
24       return this.configurableBean.getProperty1();
25     }
26   }
27
28   public String JavaDoc getProperty2() {
29     synchronized(this) {
30       return this.configurableBean.getProperty2();
31     }
32   }
33   
34   public void setValue(String JavaDoc value) {
35     synchronized(this) {
36       this.value = value;
37     }
38   }
39
40   public Object JavaDoc getValue() {
41     synchronized(this) {
42       return value;
43     }
44   }
45
46   public Object JavaDoc getTransientValue() {
47     return transientValue;
48   }
49   
50   public void setTransientValue(String JavaDoc transientValue) {
51     this.transientValue = transientValue;
52   }
53
54 }
55
56
Popular Tags