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; 011 012 013 /** 014 * <p> 015 * Interface responsible for changing monitoring strategy. 016 * It may be implemented by {@link org.picocontainer.PicoContainer containers} and 017 * single {@link org.picocontainer.ComponentAdapter component adapters}. 018 * The choice of supporting the monitor strategy is left to the 019 * implementers of the container and adapters. 020 * </p> 021 * 022 * @author Paul Hammant 023 * @author Joerg Schaible 024 * @author Mauro Talevi 025 */ 026 public interface ComponentMonitorStrategy { 027 028 /** 029 * Changes the component monitor used 030 * @param monitor the new ComponentMonitor to use 031 */ 032 void changeMonitor(ComponentMonitor monitor); 033 034 /** 035 * Returns the monitor currently used 036 * @return The ComponentMonitor currently used 037 */ 038 ComponentMonitor currentMonitor(); 039 040 }