Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.Node.start()


    @Test
    public void testSayHello() {
        // Start up the Tuscany runtime with this modules as the contribution
        Node node = NodeFactory.newInstance().createNode(new Contribution("c1", "target/classes"));
        node.start();
       
        // This contribution is configured to deploy the helloworld.composite file
        // automatically. This defines the HelloworldComponent. Get a local proxy to it
        // and call the sayHello service operation.
        Helloworld helloworld = node.getService(Helloworld.class, "HelloworldComponent");
View Full Code Here


public class SampleClientImpl {
    public static void main(String[] args) throws Exception {
        String location = ContributionLocationHelper.getContributionLocation(SampleClient.class);
        Node node = NodeFactory.newInstance().createNode(new Contribution("c1", location));
       
        node.start();

        SampleClient sampleClient = node.getService(SampleClient.class, "SampleClient");
        sampleClient.runSample();
       
        node.stop();
View Full Code Here

*/
public class BPELClient {
    public static void main(String[] args) throws Exception {

        Node node = NodeFactory.newInstance().createNode();
        node.start();
       
        Hello bpelService = node.getService(Hello.class, "BPELHelloWorldComponent");
       
        String result = bpelService.hello("Hello");
        System.out.println(result);
View Full Code Here

public class Launch {
    public static void main(String[] args) throws Exception {
        System.out.println("Starting ...");
        String contribution = ContributionLocationHelper.getContributionLocation(Launch.class);
        Node node = NodeFactory.newInstance().createNode("store.composite", new Contribution("test", contribution));
        node.start();
        System.out.println("store.composite ready for big business !!!");
        System.in.read();
        System.out.println("Stopping ...");
        node.stop();
        System.out.println();
View Full Code Here

public class RuntimeIntegration {
   
   
    public Node startNode(Contribution... contributions){
        Node node = NodeFactory.newInstance().createNode(contributions);
        node.start();
        return node;
    }
   
    public void stopNode(Node node){
        node.stop();
View Full Code Here

    public final static void main(String[] args) throws Exception {
      NodeFactory factory = NodeFactory.newInstance();
        Node node = factory.createNode(new File("src/main/resources/Client.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
        node.start();
        Composer composer = ((Client)node).getService(Composer.class, "ClientComponent/Composer");
        System.out.println(composer.Compose("ABC"));
        node.stop();
    }
View Full Code Here

    public void testInvokeReference() throws Exception {
        Node node = null;

        String contribution = ContributionLocationHelper.getContributionLocation(JSONRPCReferenceTestCase.class);
        node = NodeFactory.newInstance().createNode("JSONRPCReference.composite", new Contribution("testClient", contribution));
        node.start();

        Echo echoComponent = node.getService(Echo.class,"EchoComponentWithReference");
        String result = echoComponent.echo("ABC");
        Assert.assertEquals("echo: ABC", result);
        if (node != null) {
View Full Code Here

        try {
            node = launcher.createNode(null, equinoxContributions);
        } catch (LauncherException ex) {
            throw new SampleLauncherException(ex.getMessage());
        }
        node.start();
        return node;
    }
   
    public void stopNode(Node node){
        node.stop();
View Full Code Here

    public static void main(String[] args) throws Exception {

        String contribution = ContributionLocationHelper.getContributionLocation(Consumer.class);
        Node node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/feed/Consumer.composite", new Contribution("consumer", contribution));
       
        node.start();

        CustomerClient testService = node.getService(CustomerClient.class, "CustomerClient");
        testService.testCustomerCollection();

        node.stop();
View Full Code Here

       
       
        String contribution = ContributionLocationHelper.getContributionLocation(Provider.class);
        Node node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/feed/Provider.composite", new Contribution("provider", contribution));

        node.start();       

        System.out.println("Provider.composite ready...");

        try {
            System.in.read();
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.