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: import java.util.List;
07: import java.util.Map;
08:
09: /**
10: * Mixin interface to encapsulate all state information for each <code>BeanFactory</code> instance.
11: *
12: * @author Jonas Bonér
13: * @author Eugene Kuleshov
14: */
15: public interface DistributableBeanFactory {
16:
17: public static final String PROTOTYPE = "prototype";
18:
19: public static final String SINGLETON = "singleton";
20:
21: boolean isClustered();
22:
23: String getAppName();
24:
25: String getId();
26:
27: List getLocations();
28:
29: List getSpringConfigHelpers();
30:
31: // configuration details
32: boolean isDistributedEvent(String className);
33:
34: boolean isDistributedBean(String beanName);
35:
36: boolean isDistributedField(String beanName, String name);
37:
38: boolean isDistributedSingleton(String beanName);
39:
40: boolean isDistributedScoped(String beanName);
41:
42: // initialization
43: void addLocation(String location);
44:
45: /**
46: * Register bean definitions
47: *
48: * @param beanMap map of <code>String</code> bean names to <code>AbstractBeanDefinition</code>.
49: */
50: void registerBeanDefinitions(Map beanMap);
51:
52: // runtime
53:
54: BeanContainer getBeanContainer(ComplexBeanId beanId);
55:
56: BeanContainer putBeanContainer(ComplexBeanId beanId,
57: BeanContainer container);
58:
59: BeanContainer removeBeanContainer(ComplexBeanId beanId);
60:
61: void initializeBean(ComplexBeanId beanId, Object bean,
62: BeanContainer container);
63:
64: }
|