Package org.apache.tuscany.sca.assembly.builder

Examples of org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint


            // Create a URI address for the callback based on the Component_Name/Reference_Name pattern
            String callbackURI = "/" + component.getName() + "/" + service.getName();
            newBinding.setURI(callbackURI);

            BuilderExtensionPoint builders = registry.getExtensionPoint(BuilderExtensionPoint.class);
            BindingBuilder builder = builders.getBindingBuilder(newBinding.getType());
            if (builder != null) {
                org.apache.tuscany.sca.assembly.builder.BuilderContext builderContext = new BuilderContext(registry);
                builder.build(component, service, newBinding, builderContext, true);
            } // end if
View Full Code Here


     
      // Create a URI address for the callback based on the Component_Name/Reference_Name pattern
      //String callbackURI = "/" + component.getName() + "/" + reference.getName();
      //newBinding.setURI(callbackURI);
     
      BuilderExtensionPoint builders = registry.getExtensionPoint(BuilderExtensionPoint.class);
      BindingBuilder builder = builders.getBindingBuilder(newBinding.getType());
            if (builder != null) {
              org.apache.tuscany.sca.assembly.builder.BuilderContext builderContext = new BuilderContext(registry);
              builder.build(component, reference, newBinding, builderContext, true);
            } // end if
     
View Full Code Here

                }
            }
        } catch (Throwable e) {
            throw new ServiceRuntimeException(e);
        }
        BuilderExtensionPoint builders = registry.getExtensionPoint(BuilderExtensionPoint.class);
        builder = builders.getBindingBuilder(mappedBinding);
        remotable = isDistributed() && processor != null;
    }
View Full Code Here

        // Get the model resolvers
        modelResolvers = registry.getExtensionPoint(ModelResolverExtensionPoint.class);

        // Get composite builders
        BuilderExtensionPoint compositeBuilders = registry.getExtensionPoint(BuilderExtensionPoint.class);
        compositeBuilder =
            compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder");

        // get the validation schema
        validationSchema = registry.getExtensionPoint(ValidationSchemaExtensionPoint.class);
           
        loadSystemContribution(new ProcessorContext(monitorFactory.createMonitor()));
View Full Code Here

        artifactExtensionPoint.addArtifactProcessor(new TuscanyWSPolicyAssertionProcessor());
       
        StAXAttributeProcessorExtensionPoint attributeExtensionPoint = registry.getExtensionPoint(StAXAttributeProcessorExtensionPoint.class);
        StAXAttributeProcessor<Object> extensibleStAXAttributeProcessor = new ExtensibleStAXAttributeProcessor(attributeExtensionPoint, inputFactory, outputFactory);
       
        BuilderExtensionPoint builderExtensionPoint = registry.getExtensionPoint(BuilderExtensionPoint.class);
       
        StAXArtifactProcessor processor = artifactExtensionPoint.getProcessor(Definitions.class);
       
        Object artifact = null;
       
        // Read the first definitions string
       
        XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(WS_POLICY1));
       
        artifact = processor.read(reader, new ProcessorContext());
        assertNotNull(artifact);
        Assert.assertTrue(artifact instanceof Definitions);
        Definitions definitions1 = (Definitions) artifact;

        // Read the second definitions string
       
        reader = inputFactory.createXMLStreamReader(new StringReader(WS_POLICY2));

        artifact = processor.read(reader, new ProcessorContext());
        assertNotNull(artifact);
        Assert.assertTrue(artifact instanceof Definitions);
        Definitions definitions2 = (Definitions) artifact; 
       
        // compare the policies using the policy builder
       
        // create dummy endpoints and endpoint references
        AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
        EndpointReference epr = assemblyFactory.createEndpointReference();
        Endpoint ep = assemblyFactory.createEndpoint();
       
        // add the ws polices we've just read to the epr/ep
        epr.getPolicySets().add(definitions1.getPolicySets().get(0));
        ep.getPolicySets().add(definitions1.getPolicySets().get(0));
       
        BuilderContext builderContext = new BuilderContext((Monitor)null);
       
        for (PolicyBuilder policyBuilder : builderExtensionPoint.getPolicyBuilders()) {
            System.out.println("PolicyBuilder: " + policyBuilder.toString());
            assertTrue(policyBuilder.build(epr, ep, builderContext));
        }
       
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint

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.