Package org.picocontainer.defaults

Examples of org.picocontainer.defaults.CachingComponentAdapterFactory


        ComponentAdapterFactory _defaultCAF = new JMXExposingComponentAdapterFactory(
                new ConstructorInjectionComponentAdapterFactory(), mbeanServer,
                new DynamicMBeanProvider[] { _decoratedProvider });

        ComponentAdapterFactory _cachingCAF = new CachingComponentAdapterFactory(
                _defaultCAF);

        container_ = new DefaultPicoContainer(_cachingCAF);
        container_.registerComponentInstance(ComponentAdapterFactory.class, _defaultCAF);
    }
View Full Code Here


    }

    private static MutablePicoContainer createContainer(final Logger logger)
    {
        final ConstructorInjectionComponentAdapterFactory _nonCachingCAFactory = new ConstructorInjectionComponentAdapterFactory(); //false, new ConsoleComponentMonitor(System.out));
        final ComponentAdapterFactory _cachingCAFactory = new CachingComponentAdapterFactory(_nonCachingCAFactory);
        final MutablePicoContainer _container = new DefaultPicoContainer(_cachingCAFactory);

        _container.registerComponentInstance(ComponentAdapterFactory.class,
                _nonCachingCAFactory);
View Full Code Here

    /**
     * Creates a new container with a parent container.
     */

    public ImplementationHidingCachingPicoContainer(ComponentAdapterFactory caf, PicoContainer parent) {
        this(parent, new CachingComponentAdapterFactory(caf), new DefaultLifecycleManager());
    }
View Full Code Here

    public ImplementationHidingCachingPicoContainer(ComponentAdapterFactory caf, PicoContainer parent) {
        this(parent, new CachingComponentAdapterFactory(caf), new DefaultLifecycleManager());
    }

    public ImplementationHidingCachingPicoContainer(ComponentAdapterFactory caf, PicoContainer parent, LifecycleManager lifecyleManager) {
        this(parent, new CachingComponentAdapterFactory(caf), lifecyleManager);
    }
View Full Code Here

    protected MutablePicoContainer createImplementationHidingPicoContainer() {
        return new ImplementationHidingCachingPicoContainer();
    }

    protected MutablePicoContainer createPicoContainer(PicoContainer parent, LifecycleManager lifecycleManager) {
        return new ImplementationHidingCachingPicoContainer(new CachingComponentAdapterFactory(new DefaultComponentAdapterFactory()), parent, lifecycleManager);
    }
View Full Code Here

    protected MutablePicoContainer createImplementationHidingPicoContainer() {
        return createPicoContainer(null);
    }

    protected MutablePicoContainer createPicoContainer(PicoContainer parent) {
        return new DefaultPicoContainer(new CachingComponentAdapterFactory(new ImplementationHidingComponentAdapterFactory(new ConstructorInjectionComponentAdapterFactory(), false)), parent);
    }
View Full Code Here

    protected MutablePicoContainer createPicoContainer(PicoContainer parent) {
        return new DefaultPicoContainer(new CachingComponentAdapterFactory(new ImplementationHidingComponentAdapterFactory(new ConstructorInjectionComponentAdapterFactory(), false)), parent);
    }

    protected MutablePicoContainer createPicoContainer(PicoContainer parent, LifecycleManager lifecycleManager) {
        return new DefaultPicoContainer(new CachingComponentAdapterFactory(new ImplementationHidingComponentAdapterFactory(new ConstructorInjectionComponentAdapterFactory(), false)), parent, lifecycleManager);
    }
View Full Code Here

        }
    }

    // TODO: Fails with versions of cglib >= 2.0.1
    public void testShouldBeAbleToHandleMutualDependenciesWithoutInterfaceImplSeparation() {
        MutablePicoContainer pico = new DefaultPicoContainer(new CachingComponentAdapterFactory(new HotSwappingComponentAdapterFactory(new ConstructorInjectionComponentAdapterFactory(),
                new CglibProxyFactory())));

        pico.registerComponentImplementation(Yin.class);
        pico.registerComponentImplementation(Yang.class);
View Full Code Here

    public CachingPicoContainer(CachingComponentAdapterFactory caf, PicoContainer parent) {
        this(caf, parent, new DefaultLifecycleManager());
    }

    public CachingPicoContainer(ComponentAdapterFactory caf, PicoContainer parent) {
        this(new CachingComponentAdapterFactory(caf), parent);
    }
View Full Code Here

    /**
     * Creates a new container with a parent container.
     */
    public CachingPicoContainer(PicoContainer parent, LifecycleManager lifecycleManager) {
        this(new CachingComponentAdapterFactory(new DefaultComponentAdapterFactory()), parent, lifecycleManager);
    }
View Full Code Here

TOP

Related Classes of org.picocontainer.defaults.CachingComponentAdapterFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.