01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tcspring;
05:
06: /**
07: * Container used to store distributed beans
08: *
09: * @author Eugene Kuleshov
10: */
11: public class BeanContainer {
12: private Object bean;
13: private transient boolean isInitialized;
14: private transient ScopedBeanDestructionCallBack destructionCallBack;
15:
16: public BeanContainer(Object bean, boolean isInitialized) {
17: this .bean = bean;
18: this .isInitialized = isInitialized;
19: }
20:
21: public void setBean(Object bean) {
22: this .bean = bean;
23: }
24:
25: public Object getBean() {
26: return bean;
27: }
28:
29: public void setInitialized(boolean isInitialized) {
30: this .isInitialized = isInitialized;
31: }
32:
33: public boolean isInitialized() {
34: return isInitialized;
35: }
36:
37: public void setDestructionCallBack(
38: ScopedBeanDestructionCallBack destructionCallBack) {
39: this .destructionCallBack = destructionCallBack;
40: }
41:
42: public ScopedBeanDestructionCallBack getDestructionCallBack() {
43: return destructionCallBack;
44: }
45:
46: public String toString() {
47: return "isInitialized:" + isInitialized + " bean:" + bean
48: + " destructionCallback:" + destructionCallBack;
49: }
50:
51: }
|