KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > container > Container


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.excalibur.container;
9
10 import java.util.Iterator JavaDoc;
11 import org.apache.avalon.framework.component.Component;
12
13 /**
14  * This contains it during execution and may provide certain
15  * facilities (like a thread per EJB etc).
16  *
17  * @author <a HREF="mailto:peter@apache.org">Peter Donald</a>
18  */

19 public interface Container
20     extends Component
21 {
22     String JavaDoc ROLE = "org.apache.avalon.framework.camelot.Container";
23
24     /**
25      * Add a component instance to container.
26      *
27      * @param entry the component entry
28      */

29     void add( String JavaDoc name, Entry entry )
30         throws ContainerException;
31
32     /**
33      * Remove a component instance from container.
34      *
35      * @param name the name of component
36      */

37     void remove( String JavaDoc name )
38         throws ContainerException;
39
40     /**
41      * Retrieve Entry from container
42      *
43      * @param name the name of entry
44      * @return the entry
45      */

46     Entry getEntry( String JavaDoc name )
47         throws ContainerException;
48
49     /**
50      * List all names of entries in container.
51      *
52      * @return the list of all entries
53      */

54     String JavaDoc[] list();
55 }
56
Popular Tags