001    /*****************************************************************************
002     * Copyright (C) PicoContainer Organization. All rights reserved.            *
003     * ------------------------------------------------------------------------- *
004     * The software in this package is published under the terms of the BSD      *
005     * style license a copy of which has been included with this distribution in *
006     * the LICENSE.txt file.                                                     *
007     *                                                                           *
008     *****************************************************************************/
009    
010    package org.picocontainer.defaults;
011    
012    import org.picocontainer.ComponentMonitor;
013    
014    /**
015     * <p>
016     * Interface responsible for changing monitoring strategy.
017     * It may be implemented by {@link PicoContainer containers} and
018     * single {@link ComponentAdapter component adapters}.
019     * The choice of supporting the monitor strategy is left to the
020     * implementers of the container and adapters.
021     * </p>
022     *
023     * @author Paul Hammant
024     * @author Joerg Schaible
025     * @author Mauro Talevi
026     * @version $Revision: $
027     * @since 1.2
028     */
029    public interface ComponentMonitorStrategy {
030    
031        /**
032         * Changes the component monitor used
033         * @param monitor the new ComponentMonitor to use
034         */
035        void changeMonitor(ComponentMonitor monitor);
036    
037        /**
038         * Returns the monitor currently used
039         * @return The ComponentMonitor currently used
040         */
041        ComponentMonitor currentMonitor();
042    
043    }