01: /*
02: * <copyright>
03: *
04: * Copyright 2000-2004 BBNT Solutions, LLC
05: * under sponsorship of the Defense Advanced Research Projects
06: * Agency (DARPA).
07: *
08: * You can redistribute this software and/or modify it under the
09: * terms of the Cougaar Open Source License as published on the
10: * Cougaar Open Source Website (www.cougaar.org).
11: *
12: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23: *
24: * </copyright>
25: */
26: package org.cougaar.core.component;
27:
28: import java.util.Collection;
29: import java.beans.beancontext.*; /*make @see reference work*/
30:
31: /**
32: * A Component which contains other components.
33: * <p>
34: * A Container plays a role similar to a BeanContext.
35: * <p>
36: * Most Collection operations (add, remove, contains, etc) expect
37: * either ComponentDescription or Component instances as arguments,
38: * depending upon the caller and this component's container. In
39: * general a ComponentDescription is preferred.
40: * <p>
41: * Like all components, this component has an implicit
42: * "insertion point" in the component hierarchy. A collection
43: * operation that specifies a ComponentDescription at a lower-level
44: * insertion point will be forwarded down the hierarchy to the
45: * appropriate child container.
46: * <p>
47: * The collection API of a container is defined to be the recursive
48: * set of all components contained in that container. For example,
49: * if this container contains a "sub-" container, the size of this
50: * container includes all the components in that "sub-" container.
51: * All collection methods are similarily defined.
52: * <p>
53: * The Container will implement or delegate to an implementation of
54: * a ContainerAPI callable by associated Binders (and BinderFactories).
55: * In turn, any Container may invoke a required BinderAPI on any of its
56: * associated Binders.
57: *
58: * @see java.beans.beancontext.BeanContext
59: **/
60: public interface Container extends Component, Collection {
61: }
|