Package org.apache.tuscany.model.assembly

Examples of org.apache.tuscany.model.assembly.ComponentType


        WireFactoryService wireService = new DefaultWireFactoryService(new MessageFactoryImpl(), new JDKWireFactoryFactory(), policyRegistry);
        JavaContextFactoryBuilder builder = new JavaContextFactoryBuilder(wireService);
        AtomicComponent component = MockFactory.createComponent(name, ModuleScopeInitDestroyComponent.class,
                Scope.MODULE);
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ComponentType type = introspector.introspect(ModuleScopeInitDestroyComponent.class);
        component.getImplementation().setComponentType(type);
        builder.build(component);
        return (ContextFactory<Context>) component.getContextFactory();
    }
View Full Code Here


        return COMPONENT_TYPE;
    }

    public ComponentType load(XMLStreamReader reader, LoaderContext loaderContext) throws XMLStreamException, ConfigurationLoadException {
        assert COMPONENT_TYPE.equals(reader.getName());
        ComponentType componentType = factory.createComponentType();

        while (true) {
            switch (reader.next()) {
            case START_ELEMENT:
                AssemblyObject o = registry.load(reader, loaderContext);
                if (o instanceof Service) {
                    componentType.getServices().add((Service) o);
                } else if (o instanceof Reference) {
                    componentType.getReferences().add((Reference) o);
                } else if (o instanceof Property) {
                    componentType.getProperties().add((Property) o);
                }
                break;
            case END_ELEMENT:
                return componentType;
            }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.model.assembly.ComponentType

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.