Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.Contribution


   
    public static void main(String[] args) throws Exception {
        SampleOSGILauncherBindingSCA launcher = new SampleOSGILauncherBindingSCA();
       
        Node node = launcher.startNode(new Contribution("c1", "../../learning-more/binding-sca/calculator-contribution/target/sample-binding-sca-calculator-contribution.jar"));
        launcher.stopNode(node);
    }
View Full Code Here


    public static void main(String[] args) throws Exception {
        SampleOSGILauncherBindingWS launcher = new SampleOSGILauncherBindingWS();
       
        // launcher.launchBindingWSCalculator();
       
        Node node = launcher.startNode(new Contribution("c1", "../../learning-more/binding-ws/calculator-contribution/target/sample-binding-ws-calculator-contribution.jar"));
       
        CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
              
        double result = calculator.add(3, 2);
        System.out.println("3 + 2 = " + result);
View Full Code Here

    /**
     * The contribution-binding-sca-calculator contribution includes a client component
     * that calls the CalculatorServiceComponent from an operation marked by @Init.
     */
    public void launchBindingSCACalculator(){
        Node node = startNode(new Contribution("c1", "../../learning-more/binding-sca/contribution-calculator/target/sample-contribution-binding-sca-calculator.jar"));
       
        stopNode(node);
    }   
View Full Code Here

   
    /*
     * Using a Tuscany specific mechanism for getting at local service proxies
     */
    public void launchBindingWSCalculator() throws NoSuchDomainException, NoSuchServiceException{
        Node node = startNode(new Contribution("c1", "../../learning-more/binding-ws/contribution-calculator/target/sample-contribution-binding-ws-calculator.jar"));
       
        CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
              
        double result = calculator.add(3, 2);
        System.out.println("3 + 2 = " + result);
View Full Code Here

        JSELauncherImplementationJavaCalculatorAsync launcher = new JSELauncherImplementationJavaCalculatorAsync();
        launcher.launchImplementationJavaCalculator();        
    }
   
    public void launchImplementationJavaCalculator(){
        Node node = NodeFactory.newInstance().createNode(new Contribution("c1", "../../learning-more/async/calculator-contribution/target/sample-implementation-java-calculator-async-contribution.jar"));
        node.start();
       
        node.stop();
    }
View Full Code Here

    }
   

    public void launchBindingRMICalculator(){
     
        Node node1 = NodeFactory.newInstance().createNode(new Contribution("c1", "../../learning-more/binding-rmi/calculator-service-contribution/target/sample-binding-rmi-calculator-service-contribution.jar"));      
        Node node2 = NodeFactory.newInstance().createNode(new Contribution("c1", "../../learning-more/binding-rmi/calculator-reference-contribution/target/sample-binding-rmi-calculator-reference-contribution.jar"));
       
        node1.start();
        node2.start();
       
        CalculatorService calculator = node2.getService(CalculatorService.class, "CalculatorServiceComponent");
View Full Code Here

    protected void setUp() throws Exception {
        String contribution = "target/classes";
        nodeFactory = NodeFactory.newInstance();
        // have to set this to stop the node factory killing itself when we stop and re-start the node
        nodeFactory.setAutoDestroy(false);
        node = (NodeImpl)nodeFactory.createNode("org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.composite", new Contribution("test", contribution));
        node.start();
        helloWorld = node.getService(HelloWorldOM.class, "HelloWorldWSDLMergedComponent");
    }
View Full Code Here

    protected static Node scaConsumerNode;

    protected static void initTestEnvironment(Class<?> testClazz) throws Exception {
        String contribution = ContributionLocationHelper.getContributionLocation(testClazz);

        scaProviderNode = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/atom/Provider.composite", new Contribution("provider", contribution));
        scaProviderNode.start();

        scaConsumerNode = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/atom/Consumer.composite", new Contribution("consumer", contribution));
        scaConsumerNode.start();
    }
View Full Code Here

public class Provider {

    public static void main(String[] args) {

        String contribution = ContributionLocationHelper.getContributionLocation(Provider.class);
        Node node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/atom/Provider.composite", new Contribution("c1", contribution));
        System.out.println("Provider.composite ready...");

        try {
            System.in.read();
        } catch (IOException e) {
View Full Code Here

    @BeforeClass
    public static void init() throws Exception {
        try {
            String contribution = ContributionLocationHelper.getContributionLocation(AggregatorTestCase.class);
            node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/atom/aggregator/FeedAggregator.composite", new Contribution("test", contribution));
            node.start();

            aggregatorService = node.getService(Aggregator.class, "AtomAggregator/Aggregator");
            Assert.assertNotNull(aggregatorService);
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.node.Contribution

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.