Package org.apache.tuscany.sca.interfacedef

Examples of org.apache.tuscany.sca.interfacedef.InterfaceContractMapper


            return;

        FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class);

        UtilityExtensionPoint utils = registry.getExtensionPoint(UtilityExtensionPoint.class);
        InterfaceContractMapper mapper = utils.getUtility(InterfaceContractMapper.class);

        // Get the provider factory service declarations
        Collection<ServiceDeclaration> builderDeclarations;
        ServiceDiscovery serviceDiscovery = registry.getServiceDiscovery();
        try {
View Full Code Here


        processor.write(interfaceContract, writer, context);
        writer.close();
       
        System.out.println("Read ouput is:\n" + bos);
       
        InterfaceContractMapper interfaceContractMapper = new InterfaceContractMapperImpl(node1.getExtensionPointRegistry());
       
        Audit matchAudit = new Audit();
        boolean match = false;
        match = interfaceContractMapper.isCompatibleSubset(service.getInterfaceContract(),
                                                           interfaceContract,
                                                           matchAudit);
       
        if (!match){
            System.out.println(matchAudit.toString());
View Full Code Here

            WSDLInterface readWSDLInterface = wsdlFactory.createWSDLInterface(portType, topWSDLDefinition, extensibleResolver, null);
           
            // now check what we have just read with what we started out with to see if the compatibility test passes
            // in the real system have to check contracts not interfaces
            UtilityExtensionPoint utils = registry.getExtensionPoint(UtilityExtensionPoint.class);
            InterfaceContractMapper interfaceContractMapper = utils.getUtility(InterfaceContractMapper.class);
            boolean match = interfaceContractMapper.isCompatibleSubset(wsdlInterface, readWSDLInterface);
            Assert.assertTrue(match);
        } catch(Exception ex){
            System.out.println(ex.toString());
            ex.printStackTrace();
            node.stop();
View Full Code Here

                    biContract.setInterface(callInterface);
                    if (callInterface.getCallbackClass() != null) {
                        biContract.setCallbackInterface(javaInterfaceFactory.createJavaInterface(callInterface
                            .getCallbackClass()));
                    }
                    InterfaceContractMapper ifcm = registry.getExtensionPoint(InterfaceContractMapper.class);
                    compatible = ifcm.isCompatibleSubset(biContract, interfaceContract);
        // If the business interface class is not assignable from the service interface class but
        // they are compatible, we need to return an InterfaceContract with the business interface
        // class to store on the reference side.
        if ( compatible ) {
      return biContract;
View Full Code Here

    private ExtensibleStAXArtifactProcessor staxProcessor;

    public void setUp() throws Exception {
        AssemblyFactory factory = new DefaultAssemblyFactory();
        PolicyFactory policyFactory = new DefaultPolicyFactory();
        InterfaceContractMapper mapper = new InterfaceContractMapperImpl();
       
        StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint();
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
       
        staxProcessors.addArtifactProcessor(new CompositeProcessor(factory, policyFactory, mapper, staxProcessor));
View Full Code Here

    private TestModelResolver resolver;

    public void setUp() throws Exception {
        AssemblyFactory factory = new DefaultAssemblyFactory();
        PolicyFactory policyFactory = new DefaultPolicyFactory();
        InterfaceContractMapper mapper = new InterfaceContractMapperImpl();
       
        URLArtifactProcessorExtensionPoint documentProcessors = new DefaultURLArtifactProcessorExtensionPoint();
        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);
       
        // Create Stax processors
View Full Code Here

        // Create a work manager
        workManager = new ThreadPoolWorkManager(10);

        // Create an interface contract mapper
        InterfaceContractMapper mapper = new InterfaceContractMapperImpl();

        // Create factory extension point
        ModelFactoryExtensionPoint factories = new DefaultModelFactoryExtensionPoint();
        registry.addExtensionPoint(factories);
       
View Full Code Here

        // Create SCA assembly and SCA Java factories
        AssemblyFactory assemblyFactory = new BeanAssemblyFactory(new DefaultAssemblyFactory(), beanFactory);
        SCABindingFactory scaBindingFactory = new DefaultSCABindingFactory();
        PolicyFactory policyFactory = new DefaultPolicyFactory();
        InterfaceContractMapper interfaceContractMapper = new InterfaceContractMapperImpl();
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
        JavaInterfaceIntrospectorExtensionPoint interfaceVisitors = new DefaultJavaInterfaceIntrospectorExtensionPoint();
        JavaImplementationFactory javaImplementationFactory = new BeanJavaImplementationFactory(beanFactory);
        JavaClassIntrospectorExtensionPoint classVisitors = new DefaultJavaClassIntrospectorExtensionPoint();
       
View Full Code Here

       
        ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
        AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
        SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
        UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
        InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
        IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
        compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, null);

        OSGiTestBundles.createBundle("target/test-classes/OSGiTestService.jar", OSGiTestInterface.class, OSGiTestImpl.class);
View Full Code Here

        contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor);
       
        // Create a composite builder
        SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
        IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
        InterfaceContractMapper contractMapper = utilities.getUtility(InterfaceContractMapper.class);
        if (nonWiring) {
            domainCompositeBuilder = new CompositeBuilderNonWiringImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper, monitor);
        } else {
            domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper, monitor);
        }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.interfacedef.InterfaceContractMapper

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.