001    /*
002    @license.text@
003     */
004    
005    package biz.hammurapi.config;
006    
007    /**
008     * Provides lifecycle methods
009     * @author Pavel Vlasov 
010     * @version $Revision: 1.2 $
011     */
012    public interface Component {
013            /**
014             * Invoked by container before the first use.
015             * Component shall perform initialization 
016             * in this method.
017             * @throws ConfigurationException
018             */
019            void start() throws ConfigurationException;
020            
021            /**
022             * Invoked by container when component is not needed
023             * anymore. Component shall perform cleanup in this method.
024             * @throws ConfigurationException
025             */
026            void stop() throws ConfigurationException;
027            
028            /**
029             * Plugs the component into container and naming bus.
030             * @param Component owner.
031             */
032            void setOwner(Object owner);
033    }