Package org.apache.tuscany.sca.interfacedef.java

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


       
        // Create a endpoint resolver factory extension point
        EndpointResolverFactoryExtensionPoint endpointResolverFactories =
            registry.getExtensionPoint(EndpointResolverFactoryExtensionPoint.class);       

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

        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
View Full Code Here


            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

public class JavaImplementationActivator implements ModuleActivator {

    public void start(ExtensionPointRegistry registry) {
        ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
        AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
        JavaInterfaceFactory javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
        PolicyFactory policyFactory = modelFactories.getFactory(PolicyFactory.class);
       
        BaseJavaClassVisitor[] extensions =
            new BaseJavaClassVisitor[] {new ConstructorProcessor(assemblyFactory),
                                        new AllowsPassByReferenceProcessor(assemblyFactory),
View Full Code Here

        // Create a endpoint resolver factory extension point
        EndpointResolverFactoryExtensionPoint endpointResolverFactories =
            registry.getExtensionPoint(EndpointResolverFactoryExtensionPoint.class);

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

        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
View Full Code Here

            proxyFactories.setClassProxyFactory(new CglibProxyFactory(messageFactory, interfaceContractMapper));
        } catch (NoClassDefFoundError e) {
            logger.warning("Class proxys not supported due to NoClassDefFoundError:" + e.getMessage());
        }

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

        DataBindingExtensionPoint dataBindings = registry.getExtensionPoint(DataBindingExtensionPoint.class);
        PropertyValueFactory factory = utilities.getUtility(PropertyValueFactory.class);

        ContextFactoryExtensionPoint contextFactories = registry.getExtensionPoint(ContextFactoryExtensionPoint.class);
View Full Code Here

       
        // Create a endpoint resolver factory extension point
        EndpointResolverFactoryExtensionPoint endpointResolverFactories =
            registry.getExtensionPoint(EndpointResolverFactoryExtensionPoint.class);       

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

        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
View Full Code Here

    private void setInterfaceContract(RuntimeComponent component, Class<?> typeClass) throws InvalidInterfaceException {
        ComponentReference ref = component.getReference(name);
        if (ref.getInterfaceContract() == null) {
            ExtensionPointRegistry epr = component.getComponentContext().getExtensionPointRegistry();
            FactoryExtensionPoint fep = epr.getExtensionPoint(FactoryExtensionPoint.class);
            JavaInterfaceFactory jif = fep.getFactory(JavaInterfaceFactory.class);
            JavaInterface javaIface = jif.createJavaInterface(typeClass);
            InterfaceContract interfaceContract = jif.createJavaInterfaceContract();
            interfaceContract.setInterface(javaIface);
            ref.setInterfaceContract(interfaceContract);
        }
    }
View Full Code Here

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

        ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
        JavaInterfaceFactory javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
        // Add the WebServiceInterfaceProcessor to mark the interface remotable
        javaFactory.addInterfaceVisitor(new WebServiceInterfaceProcessor());
        // Introspect the data types
        javaFactory.addInterfaceVisitor(new DataBindingJavaInterfaceProcessor(dataBindings));
        javaFactory.addInterfaceVisitor(new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, xmlAdapterExtensionPoint));
        javaFactory.addInterfaceVisitor(new WrapperJavaInterfaceProcessor(dataBindings));


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

            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

     */
    @Test
    public void testAsyncIntrospection() throws InvalidInterfaceException
    {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory(registry);
        JavaInterfaceIntrospectorImpl introspector = new JavaInterfaceIntrospectorImpl(javaFactory);
        JavaInterfaceImpl javaInterface = new JavaInterfaceImpl();

        introspector.introspectInterface(javaInterface, AsyncServiceInterface.class);
       
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory

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.