Package org.apache.aries.blueprint.parser

Examples of org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl


        this.extenderBundle = extenderBundle;
        this.eventDispatcher = eventDispatcher;
        this.handlers = handlers;
        this.pathList = pathList;
        this.converter = new AggregateConverter(this);
        this.componentDefinitionRegistry = new ComponentDefinitionRegistryImpl();
        this.executors = executor != null ? new ExecutorServiceWrapper(executor) : null;
        this.timer = timer;
        this.processors = new ArrayList<Processor>();
        if (System.getSecurityManager() != null) {
            this.accessControlContext = BlueprintDomainCombiner.createAccessControlContext(bundleContext);
View Full Code Here


        this.extenderBundle = extenderBundle;
        this.eventDispatcher = eventDispatcher;
        this.handlers = handlers;
        this.pathList = pathList;
        this.converter = new AggregateConverter(this);
        this.componentDefinitionRegistry = new ComponentDefinitionRegistryImpl();
        this.executors = executor != null ? new ExecutorServiceWrapper(executor) : null;
        this.timer = timer;
        this.processors = new ArrayList<Processor>();
        if (System.getSecurityManager() != null) {
            this.accessControlContext = BlueprintDomainCombiner.createAccessControlContext(bundleContext);
View Full Code Here

public class ReferencesTest extends AbstractBlueprintTest {



    public void testWiring() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-references.xml");
        ProxyManager proxyManager = new AbstractProxyManager() {
            @Override
            protected Object createNewProxy(Bundle bundle, Collection<Class<?>> classes, Callable<Object> objectCallable, InvocationListener invocationListener) throws UnableToProxyException {
                return new Object();
            }
View Full Code Here

import org.apache.aries.blueprint.pojos.SimpleBean;

public class BeanLoadingTest extends AbstractBlueprintTest {

    public void testLoadSimpleBean() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-bean-classes.xml");
        Repository repository = new TestBlueprintContainer(registry)
                .getRepository();

        Object obj = repository.create("simpleBean");
        assertNotNull(obj);
View Full Code Here

        assertNotNull(obj);
        assertTrue(obj instanceof SimpleBean);
    }

    public void testLoadSimpleBeanNested() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-bean-classes.xml");
        Repository repository = new TestBlueprintContainer(registry)
                .getRepository();

        Object obj = repository.create("simpleBeanNested");
        assertNotNull(obj);
View Full Code Here

        };
        return parse(name, handlers);
    }

    protected ComponentDefinitionRegistryImpl parse(String name, NamespaceHandlerSet handlers) throws Exception {
        ComponentDefinitionRegistryImpl registry = new ComponentDefinitionRegistryImpl();
        Parser parser = new Parser();
        parser.parse(Collections.singletonList(getClass().getResource(name)));
        parser.populate(handlers, registry);
        return registry;
    }
View Full Code Here

import org.osgi.service.blueprint.container.ComponentDefinitionException;

public class WiringTest extends AbstractBlueprintTest {

    public void testWiring() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-wiring.xml");
        Repository repository = new TestBlueprintContainer(registry).getRepository();
       
        Object obj1 = repository.create("pojoA");
        assertNotNull(obj1);
        assertTrue(obj1 instanceof PojoA);
View Full Code Here

        // test destroy-method
        assertEquals(true, pojob.getDestroyCalled());
    }
   
    public void testSetterDisambiguation() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-wiring.xml");
        Repository repository = new TestBlueprintContainer(registry).getRepository();

        AmbiguousPojo pojo = (AmbiguousPojo) repository.create("ambiguousViaInt");
        assertEquals(5, pojo.getSum());
       
View Full Code Here

       
       
    }
   
    public void testFieldInjection() throws Exception {
      ComponentDefinitionRegistryImpl registry = parse("/test-wiring.xml");
      Repository repository = new TestBlueprintContainer(registry).getRepository();
     
      Object fiTestBean = repository.create("FITestBean");
      assertNotNull(fiTestBean);
      assertTrue(fiTestBean instanceof FITestBean);
View Full Code Here

          Assert.fail("Expected exception");
      } catch (ComponentDefinitionException cde) {}
    }
   
    public void testCompoundProperties() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-wiring.xml");
        Repository repository = new TestBlueprintContainer(registry).getRepository();
       
        Object obj5 = repository.create("compound");
        assertNotNull(obj5);
        assertTrue(obj5 instanceof PojoB);
View Full Code Here

TOP

Related Classes of org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl

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.