Helper class for simulating the Spring context startup order:
- Call constructor
- Set properties (possibly child beans, themselves fully initialized)
- call
ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext),
if the bean implements ApplicationContextAware
- call
Lifecycle.start(), if the bean implements Lifecycle.
To avoid calling
ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)
on a bean A before all other properties have been set on it (step 2), an instance B of this class is created. "B.client = A"
and "A depends on B" are the relationships modeled using Blueprint. This causes "B.setClient(A)" to be executed
- after all other properties have been set on A
- before A is returned by
BlueprintContainer.getComponentInstance(String) or used as a child bean
which fulfills our requirements.