/** * Disposes the cached component instance * {@inheritDoc} */ public void dispose(PicoContainer container) { if ( delegateHasLifecylce ){ if (disposed) throw new IllegalStateException("Already disposed"); dispose(getComponentInstance(container)); disposed = true; } }
/** * Starts the cached component instance * {@inheritDoc} */ public void start(PicoContainer container) { if ( delegateHasLifecylce ){ if (disposed) throw new IllegalStateException("Already disposed"); if (started) throw new IllegalStateException("Already started"); start(getComponentInstance(container)); started = true; } }
/** * Stops the cached component instance * {@inheritDoc} */ public void stop(PicoContainer container) { if ( delegateHasLifecylce ){ if (disposed) throw new IllegalStateException("Already disposed"); if (!started) throw new IllegalStateException("Not started"); stop(getComponentInstance(container)); started = false; } }