Examples of JavaInterfaceFactory


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

        MessageFactory messageFactory = factories.getFactory(MessageFactory.class);
        ProxyFactoryExtensionPoint proxyFactory = registry.getExtensionPoint(ProxyFactoryExtensionPoint.class);
        proxyFactory.setClassProxyFactory(new CglibProxyFactory(messageFactory, proxyFactory
            .getInterfaceContractMapper()));

        JavaInterfaceFactory javaFactory = factories.getFactory(JavaInterfaceFactory.class);
        JavaImplementationFactory javaImplementationFactory = factories.getFactory(JavaImplementationFactory.class);

        BaseJavaClassVisitor[] extensions =
            new BaseJavaClassVisitor[] {new ConstructorProcessor(assemblyFactory),
                                        new AllowsPassByReferenceProcessor(assemblyFactory),
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

            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

            composite.getComponents().add(component);
            RuntimeComponentReference reference = (RuntimeComponentReference)assemblyFactory.createComponentReference();
            reference.setName("default");
            ModelFactoryExtensionPoint factories =
                nodeRuntime.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

        JavaImplementation type = javaImplementationFactory.createJavaImplementation();
        Constructor<Mixed> ctor1 = Mixed.class.getConstructor(String.class, String.class, String.class);
        processor.visitConstructor(ctor1, type);

        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
        ReferenceProcessor referenceProcessor = new ReferenceProcessor(assemblyFactory, javaFactory);
        PropertyProcessor propertyProcessor = new PropertyProcessor(assemblyFactory);
        JavaParameterImpl[] parameters = type.getConstructor().getParameters();
        for (int i = 0; i < parameters.length; i++) {
            referenceProcessor.visitConstructorParameter(parameters[i], type);
View Full Code Here

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

                                                                    List.class,
                                                                    Set.class,
                                                                    String[].class);
        processor.visitConstructor(ctor1, type);
        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
        ReferenceProcessor referenceProcessor = new ReferenceProcessor(assemblyFactory, javaFactory);
        PropertyProcessor propertyProcessor = new PropertyProcessor(assemblyFactory);
        JavaParameterImpl[] parameters = type.getConstructor().getParameters();
        for (int i = 0; i < parameters.length; i++) {
            referenceProcessor.visitConstructorParameter(parameters[i], type);
View Full Code Here

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

     * @throws InvalidServiceContractException
     */
    public final void testVisitInterface() throws InvalidInterfaceException {
        DataBindingExtensionPoint registry = new DefaultDataBindingExtensionPoint();
        DataBindingJavaInterfaceProcessor processor = new DataBindingJavaInterfaceProcessor(registry);
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
       
        JavaInterface contract = javaFactory.createJavaInterface();
        contract.setJavaClass(MockInterface.class);
        JavaInterfaceContract interfaceContract = javaFactory.createJavaInterfaceContract();
        interfaceContract.setInterface(contract);
        Operation operation = newOperation("call");
        Operation operation1 = newOperation("call1");
        contract.getOperations().add(operation);
        contract.getOperations().add(operation1);
View Full Code Here

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

            component.setURI("default");
            compositeActivator.configureComponentContext(component);
            composite.getComponents().add(component);
            RuntimeComponentReference reference = (RuntimeComponentReference)assemblyFactory.createComponentReference();
            reference.setName("default");
            JavaInterfaceFactory javaInterfaceFactory = compositeActivator.getJavaInterfaceFactory();
            InterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract();
            interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(businessInterface));
            reference.setInterfaceContract(interfaceContract);
            component.getReferences().add(reference);
            reference.setComponent(component);
            reference.getBindings().add(binding);
   
View Full Code Here

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

        // Create a provider factory extension point
        ProviderFactoryExtensionPoint providerFactories =
            registry.getExtensionPoint(ProviderFactoryExtensionPoint.class);

        JavaInterfaceFactory javaInterfaceFactory =
            registry.getExtensionPoint(ModelFactoryExtensionPoint.class).getFactory(JavaInterfaceFactory.class);
        RequestContextFactory requestContextFactory =
            registry.getExtensionPoint(ContextFactoryExtensionPoint.class).getFactory(RequestContextFactory.class);

        ConversationManager conversationManager = new ConversationManagerImpl();
View Full Code Here

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

        SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
        PolicyFactory policyFactory = new DefaultPolicyFactory();
        modelFactories.addFactory(policyFactory);
        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
        InterfaceContractMapper interfaceContractMapper = new InterfaceContractMapperImpl();
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
        modelFactories.addFactory(javaFactory);
        JavaImplementationFactory javaImplementationFactory = new BeanJavaImplementationFactory(beanFactory);
        modelFactories.addFactory(javaImplementationFactory);
       
        BaseJavaClassVisitor[] extensions = new BaseJavaClassVisitor[] {
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.