Package org.apache.tuscany.sca.node

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


    /*
     * Using the Tuscany Node API to load a contribution.
     * Using the Tuscany Node API to get a local service proxy
     */
    public void launchBindingSCACalculator(){
        Node node = NodeFactory.newInstance().createNode(new Contribution("c1", "../../learning-more/binding-jsonrpc/calculator-contribution/target/sample-binding-jsonrpc-calculator-contribution.jar"));
        node.start();
       
        CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
       
        // TODO - could use JUnit assertions but don't want to have to handle JUnit dependency from Ant script
View Full Code Here


    /*
     * Using the Tuscany Node API to load a contribution.
     * Using the Tuscany Node API to get a local service proxy
     */
    public void launchBindingSCACalculator(){
        Node node = NodeFactory.newInstance().createNode(new Contribution("c1", "../../learning-more/binding-sca/calculator-contribution/target/sample-binding-sca-calculator-contribution.jar"));
        node.start();
       
        CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
       
        // TODO - could use JUnit assertions but don't want to have to handle JUnit dependency from Ant script
View Full Code Here

    /*
     * Using the Tuscany Node API to load a contribution.
     * Using the Tuscany Node API to get a local service proxy
     */
    public void launchImplementationScriptCalculator(){
        Node node = NodeFactory.newInstance().createNode(new Contribution("c1", "../../learning-more/implementation-script/calculator-contribution/target/sample-implementation-script-calculator-contribution.jar"));
        node.start();
       
        CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
       
        // TODO - could use JUnit assertions but don't want to have to handle JUnit dependency from Ant script
View Full Code Here

    @BeforeClass
    public static void setUp() throws Exception {
        final NodeFactory nf = NodeFactory.newInstance();
        String here = SampleNativeAsyncBareTestCase.class.getProtectionDomain().getCodeSource().getLocation().toString();
        // Create the node using the pattern "name of composite file to start" / Contribution to use
        node = nf.createNode("testnativeasyncbare.composite", new Contribution("test", here));
        node.start();
    }
View Full Code Here

    @Before
    public void setUp() throws Exception {
        final NodeFactory nf = NodeFactory.getInstance();
        String here = SampleNativeAsyncTestCase.class.getProtectionDomain().getCodeSource().getLocation().toString();
        // Create the node using the pattern "name of composite file to start" / Contribution to use
        node = nf.createNode("testnativeasync.composite", new Contribution("test", here));
        node.start();
    }
View Full Code Here

       
        System.out.println("Starting second node");
        final NodeFactory nf = NodeFactory.getInstance();
        String here = SampleNativeAsyncTestCase.class.getProtectionDomain().getCodeSource().getLocation().toString();
        // Create the node using the pattern "name of composite file to start" / Contribution to use
        node = nf.createNode("testnativeasync.composite", new Contribution("test", here));
        node.start();
        upper = node.getService(Upper.class, "SampleNativeAsyncReference");
        r = upper.upper2("async2");
        System.out.println(r);
        assertEquals("ASYNC2", r);
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/calculator-contribution/target/sample-binding-sca-calculator-contribution.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/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

    static Node node;

    @BeforeClass
    public static void setUp() throws Exception {
        final NodeFactory nf = NodeFactory.newInstance();
        node = nf.createNode("test.composite", new Contribution("test", here()));
        node.start();
    }
View Full Code Here

    private static Node node;

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        String location = ContributionLocationHelper.getContributionLocation("Calculator.composite");
        node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("calculator", location));
        System.out.println("SCA Node API ClassLoader: " + node.getClass().getClassLoader());
        node.start();
    }
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.