Package org.apache.tuscany.core.config

Examples of org.apache.tuscany.core.config.ComponentTypeIntrospector.introspect()


                Scope.MODULE);
        ca[2] = MockFactory.createComponent("TestServiceDestroyOnly", ModuleScopeDestroyOnlyComponent.class,
                Scope.MODULE);
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ca[0].getImplementation().setComponentType(introspector.introspect(ModuleScopeInitDestroyComponent.class));
        ca[1].getImplementation().setComponentType(introspector.introspect(ModuleScopeInitOnlyComponent.class));
        ca[2].getImplementation().setComponentType(introspector.introspect(ModuleScopeDestroyOnlyComponent.class));
        for (AtomicComponent aCa : ca) {
            builder.build(aCa);
            configs.add((ContextFactory<Context>) aCa.getContextFactory());
View Full Code Here


        ca[2] = MockFactory.createComponent("TestServiceDestroyOnly", ModuleScopeDestroyOnlyComponent.class,
                Scope.MODULE);
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ca[0].getImplementation().setComponentType(introspector.introspect(ModuleScopeInitDestroyComponent.class));
        ca[1].getImplementation().setComponentType(introspector.introspect(ModuleScopeInitOnlyComponent.class));
        ca[2].getImplementation().setComponentType(introspector.introspect(ModuleScopeDestroyOnlyComponent.class));
        for (AtomicComponent aCa : ca) {
            builder.build(aCa);
            configs.add((ContextFactory<Context>) aCa.getContextFactory());
View Full Code Here

                Scope.MODULE);
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ca[0].getImplementation().setComponentType(introspector.introspect(ModuleScopeInitDestroyComponent.class));
        ca[1].getImplementation().setComponentType(introspector.introspect(ModuleScopeInitOnlyComponent.class));
        ca[2].getImplementation().setComponentType(introspector.introspect(ModuleScopeDestroyOnlyComponent.class));
        for (AtomicComponent aCa : ca) {
            builder.build(aCa);
            configs.add((ContextFactory<Context>) aCa.getContextFactory());

        }
View Full Code Here

                Scope.MODULE);
        ca[1] = MockFactory.createComponent("TestServiceEagerInit", ModuleScopeEagerInitComponent.class,
                Scope.MODULE);
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ComponentType type = introspector.introspect(OrderedInitPojo.class);
        ca[0].getImplementation().setComponentType(introspector.introspect(ModuleScopeEagerInitDestroyComponent.class));
        ca[1].getImplementation().setComponentType(introspector.introspect(ModuleScopeEagerInitComponent.class));
        for (AtomicComponent aCa : ca) {
            builder.build(aCa);
            configs.add((ContextFactory<Context>) aCa.getContextFactory());
View Full Code Here

        ca[1] = MockFactory.createComponent("TestServiceEagerInit", ModuleScopeEagerInitComponent.class,
                Scope.MODULE);
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ComponentType type = introspector.introspect(OrderedInitPojo.class);
        ca[0].getImplementation().setComponentType(introspector.introspect(ModuleScopeEagerInitDestroyComponent.class));
        ca[1].getImplementation().setComponentType(introspector.introspect(ModuleScopeEagerInitComponent.class));
        for (AtomicComponent aCa : ca) {
            builder.build(aCa);
            configs.add((ContextFactory<Context>) aCa.getContextFactory());
        }
View Full Code Here

                Scope.MODULE);
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ComponentType type = introspector.introspect(OrderedInitPojo.class);
        ca[0].getImplementation().setComponentType(introspector.introspect(ModuleScopeEagerInitDestroyComponent.class));
        ca[1].getImplementation().setComponentType(introspector.introspect(ModuleScopeEagerInitComponent.class));
        for (AtomicComponent aCa : ca) {
            builder.build(aCa);
            configs.add((ContextFactory<Context>) aCa.getContextFactory());
        }
        return configs;
View Full Code Here

        ca[0] = MockFactory.createComponent("one", OrderedInitPojo.class, Scope.MODULE);
        ca[1] = MockFactory.createComponent("two", OrderedInitPojo.class, Scope.MODULE);
        ca[2] = MockFactory.createComponent("three", OrderedInitPojo.class, Scope.MODULE);
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ComponentType type = introspector.introspect(OrderedInitPojo.class);
        ca[0].getImplementation().setComponentType(type);
        ca[1].getImplementation().setComponentType(type);
        ca[2].getImplementation().setComponentType(type);
        for (AtomicComponent aCa : ca) {
            builder.build(aCa);
View Full Code Here

        AtomicComponent[] ca = new AtomicComponent[3];
        ca[0] = MockFactory.createComponent("one", OrderedEagerInitPojo.class, Scope.MODULE);
        ca[1] = MockFactory.createComponent("two", OrderedEagerInitPojo.class, Scope.MODULE);
        ca[2] = MockFactory.createComponent("three", OrderedEagerInitPojo.class, Scope.MODULE);
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ComponentType type = introspector.introspect(OrderedEagerInitPojo.class);
        ca[0].getImplementation().setComponentType(type);
        ca[1].getImplementation().setComponentType(type);
        ca[2].getImplementation().setComponentType(type);
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        for (AtomicComponent aCa : ca) {
View Full Code Here

        // bootstrap the minimal set of loaders needed to read the system module files
        // all others should be defined in the system.module file
        components.add(bootstrapLoader(factory, introspector, ModuleLoader.class));
        components.add(bootstrapLoader(factory, introspector, ModuleFragmentLoader.class));
        Component propFactory = factory.createSystemComponent("org.apache.tuscany.core.system.loader.DefaultPropertyFactory", StAXPropertyFactory.class, StringParserPropertyFactory.class, Scope.MODULE);
        introspector.introspect(StAXPropertyFactory.class);
        components.add(propFactory);
        components.add(bootstrapLoader(factory, introspector, ComponentLoader.class));
        components.add(bootstrapLoader(factory, introspector, EntryPointLoader.class));
        components.add(bootstrapLoader(factory, introspector, InterfaceJavaLoader.class));
        components.add(bootstrapLoader(factory, introspector, SystemImplementationLoader.class));
View Full Code Here

    private List<ContextFactory<Context>> createConfigurations() throws BuilderException, ConfigurationLoadException {
        WireFactoryService wireService = new DefaultWireFactoryService(new MessageFactoryImpl(), new JDKWireFactoryFactory(), new DefaultPolicyBuilderRegistry());
        JavaContextFactoryBuilder builder = new JavaContextFactoryBuilder(wireService);
        AtomicComponent component = MockFactory.createComponent("TestService1", SessionScopeComponentImpl.class, Scope.SESSION);
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ComponentType type = introspector.introspect(SessionScopeComponentImpl.class);
        component.getImplementation().setComponentType(type);
        builder.build(component);
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        configs.add((ContextFactory<Context>) component.getContextFactory());
        return configs;
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.