001 /*****************************************************************************
002 * Copyright (C) NanoContainer 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 package org.nanocontainer.integrationkit;
010
011 import org.picocontainer.MutablePicoContainer;
012
013 /**
014 * Records method calls on a {@link MutablePicoContainer}.
015 * This allows to replay all invocations on a different container instance.
016 *
017 * @author Konstantin Pribluda ( konstantin.pribluda(at)infodesire.com )
018 * @author Aslak Hellesøy
019 * @author Mauro Talevi
020 */
021 public interface ContainerRecorder {
022
023 /**
024 * Creates a new proxy that will forward all method invocations to the container passed to
025 * the constructor. All method invocations are recorded so that they can be replayed on a
026 * different container.
027 *
028 * @return a recording container proxy
029 * @see #replay
030 */
031 public MutablePicoContainer getContainerProxy();
032
033 /**
034 * Replay recorded invocations on target container
035 *
036 * @param target container where the invocations should be replayed.
037 */
038 public void replay(MutablePicoContainer target);
039 }