@Test public void pico_container_of_migration_container_is_started_in_constructor() { assertThat(underTest.getPicoContainer().getLifecycleState().isStarted()).isTrue(); }
/** * This method MUST NOT be renamed stop() because the container is registered itself in picocontainer. Starting * a component twice is not authorized. */ public ComponentContainer stopComponents() { try { stopChildren(); if (pico.getLifecycleState().isStarted()) { pico.stop(); } pico.dispose(); } finally { if (parent != null) { parent.removeChild(this); } } return this; }
assertThat(picoContainer.getLifecycleState().isStarted()).isFalse(); assertThat(picoContainer.getLifecycleState().isStopped()).isFalse(); assertThat(picoContainer.getLifecycleState().isDisposed()).isTrue();
/** * Shut down the console. * */ public void shutdown() { m_shutdown = true; m_container.getComponent(ConsoleCommunication.class).shutdown(); try { m_timer.cancel(); } catch (Exception e) { noOp(); } if (m_container.getLifecycleState().isStarted()) { m_container.stop(); } }
@Override public LifecycleState getLifecycleState() { return delegatePicoContainer.getLifecycleState(); }
public LifecycleState getLifecycleState() { return delegate.getLifecycleState(); } }
public LifecycleState getLifecycleState() { return delegate.getLifecycleState(); }
/** * This method MUST NOT be renamed stop() because the container is registered itself in picocontainer. Starting * a component twice is not authorized. */ public ComponentContainer stopComponents() { try { stopChildren(); if (pico.getLifecycleState().isStarted()) { pico.stop(); } pico.dispose(); } finally { if (parent != null) { parent.removeChild(this); } } return this; }