@Test public void testStartOrder2() { COUNTER = new AtomicInteger(); ExoContainer container = AbstractTestContainer.createRootContainer(getClass(), "test-exo-container.xml", "testStartOrder2"); TSO2_A a = container.getComponentInstanceOfType(TSO2_A.class); assertNotNull(a); TSO2_B b = container.getComponentInstanceOfType(TSO2_B.class); assertNotNull(b); TSO2_C c = container.getComponentInstanceOfType(TSO2_C.class); assertNotNull(c); TSO2_D d = container.getComponentInstanceOfType(TSO2_D.class); assertNotNull(d); assertTrue(a.startOrder > 0); assertTrue(c.startOrder > 0); assertTrue(d.startOrder > 0); assertTrue(c.startOrder < a.startOrder); assertTrue(d.startOrder < a.startOrder); assertTrue(c.startOrder < d.startOrder); TSO2_A2 a2 = container.getComponentInstanceOfType(TSO2_A2.class); assertNotNull(a2); TSO2_B2 b2 = container.getComponentInstanceOfType(TSO2_B2.class); assertNotNull(b2); TSO2_C2 c2 = container.getComponentInstanceOfType(TSO2_C2.class); assertNotNull(c2); assertTrue(a2.startOrder > 0); assertTrue(b2.startOrder > 0); assertTrue(c2.startOrder > 0); assertTrue(c2.startOrder < b2.startOrder); assertTrue(b2.startOrder < a2.startOrder); }
public <T> T getComponentInstanceOfType(Class<T> componentType) { return getComponentInstanceOfType(componentType, true); }
ExoContainer extends AbstractContainer { public <T> T getComponentInstanceOfType(Class<T> componentType) { return getComponentInstanceOfType(componentType, true); } }
ExoContainer extends AbstractContainer { public <T> T getComponentInstanceOfType(Class<T> componentType) { return getComponentInstanceOfType(componentType, true); } ExoContainer();  ExoContainer(ExoContainer parent); }
ExoContainer extends AbstractContainer { public <T> T getComponentInstanceOfType(Class<T> componentType) { return getComponentInstanceOfType(componentType, true); } ExoContainer();  ExoContainer(ExoContainer parent); static Set<String> getProfilesFromProperty(); static Set<String> getProfiles(); static boolean hasProfileInProperty(String profileName); static boolean hasProfile(String profileName); ExoContainerContext getContext(); synchronized void dispose(); synchronized void start(boolean init); synchronized void initialize(); synchronized void start(); synchronized void stop(); void addComponentLifecylePlugin(ComponentLifecyclePlugin plugin); void addContainerLifecylePlugin(ContainerLifecyclePlugin plugin); ComponentAdapter<T> registerComponentImplementation(Class<T> componentImplementation); ComponentAdapter<T> registerComponentInstance(T componentInstance); T createComponent(Class<T> clazz); ComponentAdapter<?> getComponentAdapter(Object componentKey); Object getComponentInstance(Object componentKey); @Managed @ManagedName("RegisteredComponentNames") @ManagedDescription("Return the list of the registered component names") Set<String> getRegisteredComponentNames(); ExoContainer getParent(); boolean canBeStarted(); boolean canBeStopped(); boolean canBeDisposed(); ContextManager getContextManager(); boolean isContextManagerLoaded(); T getComponentInstanceOfType(Class<T> componentType); T getComponentInstanceOfType(Class<T> componentType, boolean autoRegistration); ComponentAdapter<T> getComponentAdapterOfType(Class<T> componentType); ComponentAdapter<T> getComponentAdapterOfType(Class<T> componentType, boolean autoRegistration); T getComponentInstance(Object componentKey, Class<T> bindType); T getComponentInstance(Object componentKey, Class<T> bindType, boolean autoRegistration); ComponentAdapter<T> getComponentAdapter(Object componentKey, Class<T> bindType); ComponentAdapter<T> getComponentAdapter(Object componentKey, Class<T> bindType, boolean autoRegistration); }
ExoContainer extends AbstractContainer { public <T> T getComponentInstanceOfType(Class<T> componentType) { return getComponentInstanceOfType(componentType, true); } ExoContainer();  ExoContainer(ExoContainer parent); static Set<String> getProfilesFromProperty(); static Set<String> getProfiles(); static boolean hasProfileInProperty(String profileName); static boolean hasProfile(String profileName); ExoContainerContext getContext(); synchronized void dispose(); synchronized void start(boolean init); synchronized void initialize(); synchronized void start(); synchronized void stop(); void addComponentLifecylePlugin(ComponentLifecyclePlugin plugin); void addContainerLifecylePlugin(ContainerLifecyclePlugin plugin); ComponentAdapter<T> registerComponentImplementation(Class<T> componentImplementation); ComponentAdapter<T> registerComponentInstance(T componentInstance); T createComponent(Class<T> clazz); ComponentAdapter<?> getComponentAdapter(Object componentKey); Object getComponentInstance(Object componentKey); @Managed @ManagedName("RegisteredComponentNames") @ManagedDescription("Return the list of the registered component names") Set<String> getRegisteredComponentNames(); ExoContainer getParent(); boolean canBeStarted(); boolean canBeStopped(); boolean canBeDisposed(); ContextManager getContextManager(); boolean isContextManagerLoaded(); T getComponentInstanceOfType(Class<T> componentType); T getComponentInstanceOfType(Class<T> componentType, boolean autoRegistration); ComponentAdapter<T> getComponentAdapterOfType(Class<T> componentType); ComponentAdapter<T> getComponentAdapterOfType(Class<T> componentType, boolean autoRegistration); T getComponentInstance(Object componentKey, Class<T> bindType); T getComponentInstance(Object componentKey, Class<T> bindType, boolean autoRegistration); ComponentAdapter<T> getComponentAdapter(Object componentKey, Class<T> bindType); ComponentAdapter<T> getComponentAdapter(Object componentKey, Class<T> bindType, boolean autoRegistration);  }