Package org.picocontainer

Examples of org.picocontainer.MutablePicoContainer.registerComponentInstance()


    {
        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);

        logger.debug("Created Top Level Container");
        return _container;
    }
View Full Code Here


    {
        final Class factoryClazz = ObjectUtil.classForName(factoryName);

        final MutablePicoContainer pico = new DefaultPicoContainer();

        pico.registerComponentInstance(TaskProcessor.class, taskProcessor);

        pico.registerComponentImplementation(RetryStrategyFactory.class, factoryClazz);

        pico.registerComponentInstance(config);
View Full Code Here

        pico.registerComponentInstance(TaskProcessor.class, taskProcessor);

        pico.registerComponentImplementation(RetryStrategyFactory.class, factoryClazz);

        pico.registerComponentInstance(config);

        return (RetryStrategyFactory) pico.getComponentInstance(RetryStrategyFactory.class);
    }

    public final void schedulePush()
View Full Code Here

            {
                container_.removeChildContainer(_channelContainer);
            }
        };

        _channelContainer.registerComponentInstance(IFactory.class, _factory);
        return _channelContainer;
    }
}
View Full Code Here

                container_.removeChildContainer(_adminContainer);
            }
        };

        _adminContainer.registerComponentInstance(IEventChannel.class, _channelAdapter);
        return _adminContainer;
    }

    /**
     * The MyFactory attribute is a readonly attribute that maintains the object reference of the
View Full Code Here

    private MutablePicoContainer newContainerForAdmin(final int id)
    {
        final MutablePicoContainer _container = PicoContainerFactory.createChildContainer(container_);

        _container.registerComponentInstance(new TypedEventChannelAdapter(_container, getJMXObjectName(), id));

        return _container;
    }

    public String getMBeanType()
View Full Code Here

//        MutablePicoContainer container = bindingLoader.getContainer();
//        container = configuration.setupBindings(container);
//        bindingLoader.setContainer(container);

        //register cmponents available to bindings at runtime
        context.registerComponentInstance(new BindingFactoryImpl(bindingLoader));

        //binding walker support
        context.registerComponentInstance(new BindingWalkerFactoryImpl(bindingLoader, context));

        //logger
View Full Code Here

        //register cmponents available to bindings at runtime
        context.registerComponentInstance(new BindingFactoryImpl(bindingLoader));

        //binding walker support
        context.registerComponentInstance(new BindingWalkerFactoryImpl(bindingLoader, context));

        //logger
        context.registerComponentInstance(logger);

        //setup the namespace support
View Full Code Here

        //binding walker support
        context.registerComponentInstance(new BindingWalkerFactoryImpl(bindingLoader, context));

        //logger
        context.registerComponentInstance(logger);

        //setup the namespace support
        NamespaceSupport namespaces = new NamespaceSupport();
        HashMap mappings = new HashMap();
View Full Code Here

            }

            namespaces.declarePrefix(key, (String) mapping.getValue());
        }

        context.registerComponentInstance(namespaces);
        context.registerComponentInstance(new NamespaceSupportWrapper(namespaces));
       
        SchemaIndex index = new SchemaIndexImpl( new XSDSchema[]{configuration.schema()} );
        context.registerComponentInstance(index);
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.