KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nanocontainer > integrationkit > ContainerRecorder


1 /*****************************************************************************
2  * Copyright (C) NanoContainer Organization. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  * *
8  *****************************************************************************/

9 package org.nanocontainer.integrationkit;
10
11 import org.picocontainer.MutablePicoContainer;
12
13 /**
14  * Records method calls on a {@link MutablePicoContainer}.
15  * This allows to replay all invocations on a different container instance.
16  *
17  * @author Konstantin Pribluda ( konstantin.pribluda(at)infodesire.com )
18  * @author Aslak Hellesøy
19  * @author Mauro Talevi
20  */

21 public interface ContainerRecorder {
22
23     /**
24      * Creates a new proxy that will forward all method invocations to the container passed to
25      * the constructor. All method invocations are recorded so that they can be replayed on a
26      * different container.
27      *
28      * @return a recording container proxy
29      * @see #replay
30      */

31     public MutablePicoContainer getContainerProxy();
32
33     /**
34      * Replay recorded invocations on target container
35      *
36      * @param target container where the invocations should be replayed.
37      */

38     public void replay(MutablePicoContainer target);
39 }
Popular Tags