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: * Idea by Rachel Davies, Original code by various *
009: *****************************************************************************/package org.nanocontainer.aop;
010:
011: import org.picocontainer.PicoContainer;
012: import org.picocontainer.defaults.ComponentAdapterFactory;
013:
014: /**
015: * Produces <code>AspectablePicoContainer</code> objects. Mixes in an
016: * <code>AspectsContainer</code> with a
017: * <code>org.picocontainer.MutablePicoContainer</code> to produce an
018: * <code>AspectablePicoContainer</code>.
019: *
020: * @author Stephen Molitor
021: * @author Mauro Talevi
022: * @version $Revision: 3144 $
023: */
024: public interface AspectablePicoContainerFactory {
025:
026: /**
027: * Creates a new <code>AspectablePicoContainer</code>.
028: *
029: * @param containerClass the class of the basic container to delegate to.
030: * @param aspectsManager the aspects manager used to register and apply
031: * aspects.
032: * @param componentAdapterFactory the delegate component adapter factory
033: * used to produce components.
034: * @param parent the parent container.
035: * @return a new <code>AspectablePicoContainer</code>.
036: */
037: public AspectablePicoContainer createContainer(
038: Class containerClass, AspectsManager aspectsManager,
039: ComponentAdapterFactory componentAdapterFactory,
040: PicoContainer parent);
041:
042: /**
043: * Creates a new <code>AspectablePicoContainer</code>.
044: *
045: * @param containerClass the class of the basic container to delegate to.
046: * @param componentAdapterFactory the delegate component adapter factory
047: * used to produce components.
048: * @param parent the parent container.
049: * @return a new <code>AspectablePicoContainer</code>.
050: */
051: AspectablePicoContainer createContainer(Class containerClass,
052: ComponentAdapterFactory componentAdapterFactory,
053: PicoContainer parent);
054:
055: /**
056: * Creates a new <code>AspectablePicoContainer</code>. Uses
057: * <code>org.picocontainer.defaults.DefaultPicoContainer</code> as the
058: * delegate container.
059: *
060: * @param componentAdapterFactory the delegate component adapter factory
061: * used to produce components.
062: * @param parent the parent container.
063: * @return a new <code>AspectablePicoContainer</code>.
064: */
065: AspectablePicoContainer createContainer(
066: ComponentAdapterFactory componentAdapterFactory,
067: PicoContainer parent);
068:
069: /**
070: * Creates a new <code>AspectablePicoContainer</code>. Uses
071: * <code>org.picocontainer.defaults.DefaultPicoContainer</code> as the
072: * delegate container.
073: *
074: * @param componentAdapterFactory the delegate component adapter factory
075: * used to produce components.
076: * @return a new <code>AspectablePicoContainer</code>.
077: */
078: AspectablePicoContainer createContainer(
079: ComponentAdapterFactory componentAdapterFactory);
080:
081: /**
082: * Creates a new <code>AspectablePicoContainer</code>. Uses
083: * <code>org.picocontainer.defaults.DefaultPicoContainer</code> as the
084: * delegate container. Uses
085: * <code>org.picocontainer.defaults.DefaultComponentAdapterFactory</code>
086: * as the delegate component adapter factory.
087: *
088: * @param parent the parent container.
089: * @return a new <code>AspectablePicoContainer</code>.
090: */
091: AspectablePicoContainer createContainer(PicoContainer parent);
092:
093: /**
094: * Creates a new <code>AspectablePicoContainer</code>. Uses
095: * <code>org.picocontainer.defaults.DefaultPicoContainer</code> as the
096: * delegate container. Uses
097: * <code>org.picocontainer.defaults.DefaultComponentAdapterFactory</code>
098: * as the delegate component adapter factory.
099: *
100: * @return a new <code>AspectablePicoContainer</code>.
101: */
102: AspectablePicoContainer createContainer();
103:
104: /**
105: * Make a child <code>AspectablePicoContainer</code> of a given <code>AspectablePicoContainer</code>.
106: * The child container will be obtained aspectifying <code>MutablePicoContainer#makeChildContainer()</code>.
107: *
108: * @param aspectsManager the aspects manager used to register and apply aspects.
109: * @param parent the parent AspectablePicoContainer
110: * @return A child AspectablePicoContainer
111: */
112: AspectablePicoContainer makeChildContainer(
113: AspectsManager aspectsManager,
114: AspectablePicoContainer parent);
115:
116: /**
117: * Make a child <code>AspectablePicoContainer</code> of a given <code>AspectablePicoContainer</code>
118: * The child container will be obtained aspectifying <code>MutablePicoContainer#makeChildContainer()</code>.
119: *
120: * @param parent the parent AspectablePicoContainer
121: * @return A child AspectablePicoContainer
122: */
123: AspectablePicoContainer makeChildContainer(
124: AspectablePicoContainer parent);
125:
126: }
|