Examples of JavaInterfaceFactory


Examples of org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory

    public void start(ExtensionPointRegistry registry) {

        // Create the test  implementation factory
        ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
        AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class);
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
        TestImplementationFactory testFactory = new DefaultTestImplementationFactory(assemblyFactory, javaFactory);
        factories.addFactory(testFactory);

        // Add the test implementation extension to the StAXArtifactProcessor
        // extension point
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory

        policyFactory = new DefaultPolicyFactory();
        mapper = new InterfaceContractMapperImpl();
        inputFactory = XMLInputFactory.newInstance();
        staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
        JavaInterfaceFactory javaInterfaceFactory = new DefaultJavaInterfaceFactory();
        modelFactories.addFactory(javaInterfaceFactory);

        osgiProcessor = new OSGiImplementationProcessor(modelFactories);
        staxProcessors.addArtifactProcessor(osgiProcessor);
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory

            composite.getComponents().add(component);
            RuntimeComponentReference reference = (RuntimeComponentReference)assemblyFactory.createComponentReference();
            reference.setName("default");
            ModelFactoryExtensionPoint factories =
                runtime.getExtensionPointRegistry().getExtensionPoint(ModelFactoryExtensionPoint.class);
            JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class);
            InterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract();
            interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(businessInterface));
            reference.setInterfaceContract(interfaceContract);
            component.getReferences().add(reference);
            reference.setComponent(component);
            SCABindingFactory scaBindingFactory = factories.getFactory(SCABindingFactory.class);
            SCABinding binding = scaBindingFactory.createSCABinding();
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory

        Group2GroupTransformer group2GroupTransformer = new Group2GroupTransformer();
        group2GroupTransformer.setMediator(mediator);
        transformers.addTransformer(group2GroupTransformer, true);

        ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
        JavaInterfaceFactory javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);

        // [rfeng] The JAX-WS processor should come before the Databinding processor to make sure @WebService
        // is honored as Remoteable
        javaFactory.addInterfaceVisitor(new JAXWSJavaInterfaceProcessor(faultExceptionMapper));

        javaFactory.addInterfaceVisitor(new DataBindingJavaInterfaceProcessor(dataBindings));

        RuntimeWireProcessorExtensionPoint wireProcessorExtensionPoint = registry.getExtensionPoint(RuntimeWireProcessorExtensionPoint.class);
        if (wireProcessorExtensionPoint != null) {
            wireProcessorExtensionPoint.addWireProcessor(new DataBindingRuntimeWireProcessor(mediator, dataBindings, faultExceptionMapper));
        }
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory

        xmlFactory = XMLInputFactory.newInstance();
       
        modelFactories = new DefaultModelFactoryExtensionPoint();
        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
        modelFactories.addFactory(assemblyFactory);
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
        modelFactories.addFactory(javaFactory);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory

                domainRegistry = RuntimeUtils.getClientEndpointRegistry(extensionsRegistry, domainURI);
            }

            FactoryExtensionPoint factories = extensionsRegistry.getExtensionPoint(FactoryExtensionPoint.class);
            AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class);
            JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class);
            ProxyFactory proxyFactory = new ExtensibleProxyFactory(extensionsRegistry.getExtensionPoint(ProxyFactoryExtensionPoint.class));

            CompositeContext compositeContext = new CompositeContext(extensionsRegistry, domainRegistry, null, domainURI, null, null);

            List<Endpoint> eps = domainRegistry.findEndpoint(serviceName);
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory

                        return Thread.currentThread().getContextClassLoader();
                    }
                });

                javaInterface.setJavaClass(classLoader.loadClass(javaInterface.getName()));
                JavaInterfaceFactory javaInterfaceFactory = getJavaInterfaceFactory(compositeContext);

                try {
                    javaInterfaceFactory.createJavaInterface(javaInterface, javaInterface.getJavaClass());
                } catch (InvalidInterfaceException e) {
                    throw new ServiceRuntimeException(e);
                }
                //FIXME: If the interface needs XSDs to be loaded (e.g., for static SDO),
                // this needs to be done here.  We usually search for XSDs in the current
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory

    }

    private JavaInterfaceFactory getJavaInterfaceFactory(CompositeContext compositeContext) {
        ExtensionPointRegistry extensionPointRegistry = compositeContext.getExtensionPointRegistry();
        FactoryExtensionPoint factories = extensionPointRegistry.getExtensionPoint(FactoryExtensionPoint.class);
        JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class);
        return javaInterfaceFactory;
    }
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory

        // Create pseudo-service
        ComponentService service = assemblyFactory.createComponentService();
        ExtensionPointRegistry registry = compositeContext.getExtensionPointRegistry();
        FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
        JavaInterfaceFactory javaInterfaceFactory =
            (JavaInterfaceFactory)modelFactories.getFactory(JavaInterfaceFactory.class);
        JavaInterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract();
        try {
            interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(AsyncResponseService.class));
        } catch (InvalidInterfaceException e1) {
            // Nothing to do here - will not happen
        } // end try
        service.setInterfaceContract(interfaceContract);
        String serviceName = epr.getReference().getName() + "_asyncCallback";
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory

//        dataBindings.addDataBinding(new CallableReferenceDataBinding());
//        transformers.addTransformer(new CallableReference2XMLStreamReader(), true);
//        transformers.addTransformer(new XMLStreamReader2CallableReference(), false);

        FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
        JavaInterfaceFactory javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);

        // [rfeng] The JAX-WS processor should come before the Databinding processor to make sure @WebService
        // is honored as Remoteable
        javaFactory.addInterfaceVisitor(new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, xmlAdapterExtensionPoint));

        javaFactory.addInterfaceVisitor(new DataBindingJavaInterfaceProcessor(dataBindings));

        RuntimeWireProcessorExtensionPoint wireProcessorExtensionPoint = registry.getExtensionPoint(RuntimeWireProcessorExtensionPoint.class);
        if (wireProcessorExtensionPoint != null) {
            wireProcessorExtensionPoint.addWireProcessor(new DataBindingRuntimeWireProcessor(mediator, dataBindings, faultExceptionMapper));
        }
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.