Package org.apache.tuscany.sca.node

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


import com.tuscanyscatours.payment.Payment;

public class PaymentLauncher {

    public static void main(String[] args) throws Exception {
        SCANode node = SCANodeFactory.newInstance().createSCANode(null,
                                                              locate("payment-spring-scatag"),
                                                              locate("creditcard-payment-jaxb"));
        node.start();
       
        SCAClient client = (SCAClient)node;
        Payment payment = client.getService(Payment.class, "Payment/Payment");

        System.out.println("Payment Spring SCATag test");
        System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
        System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1", 100.00f));
       
        node.stop();
    }
View Full Code Here


import com.tuscanyscatours.payment.Payment;

public class PaymentLauncher {

    public static void main(String[] args) throws Exception {
        SCANode node = SCANodeFactory.newInstance().createSCANode(null,
                                                              locate("payment-spring"),
                                                              locate("creditcard-payment-jaxb"));
        node.start();
       
        SCAClient client = (SCAClient)node;
        Payment payment = client.getService(Payment.class, "Payment/Payment");

        System.out.println("Payment Spring test");
        System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
        System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1", 100.00f));
       
        node.stop();
    }
View Full Code Here

import com.tuscanyscatours.payment.Payment;

public class PaymentLauncher {

    public static void main(String[] args) throws Exception {
        SCANode node = SCANodeFactory.newInstance().createSCANode(null,
                                                              locate("payment-python"),
                                                              locate("emailgateway"));
        node.start();
       
        SCAClient client = (SCAClient)node;
        Payment payment = client.getService(Payment.class, "Payment");

        System.out.println("Payment Python test");
        System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
       
        node.stop();
    }
View Full Code Here

import com.tuscanyscatours.payment.Payment;

public class PaymentLauncher {

    public static void main(String[] args) throws Exception {
        SCANode node = SCANodeFactory.newInstance().createSCANode(null,
                                                              locate("payment-java-reference-pass"));
        node.start();
       
        SCAClient client = (SCAClient)node;
        Payment payment = client.getService(Payment.class, "Payment");

        System.out.println("===================================================");
        System.out.println("\n\nPayment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
        System.out.println("===================================================");
       
        node.stop();
    }
View Full Code Here

        runTripBooking();
        runTripWireElement();
    }

    private static void runAirportCodes() throws Exception {
        SCANode node =
            SCANodeFactory.newInstance().createSCANode("test-clients/airportcodes-client.composite",
                                                       locate("usingsca"));

        node.start();

        Runnable client = ((SCAClient)node).getService(Runnable.class, "AirportCodesClient");
        client.run();

        node.stop();
    }
View Full Code Here

        System.setProperty(Context.PROVIDER_URL, "ejbd://localhost:4201");

        SCAContribution notificationContribution = locate("notification");
        SCAContribution notificationEJBContribution = locate("notification-ejb");

        SCANode node =
            SCANodeFactory.newInstance().createSCANode("notification-ejb.composite",
                                                       notificationContribution,
                                                       notificationEJBContribution);
        node.start();

        System.out.println("Quick notification test");
        Notification notification = ((SCAClient)node).getService(Notification.class, "Notification");
        String accountID = "1234";
        String subject = "Holiday payment taken";
        String message = "Payment of £102.37 accepted...";
        notification.notify(accountID, subject, message);

        System.out.println("Node started - Press enter to shutdown.");
        System.in.read();
        node.stop();
    }
View Full Code Here

import com.tuscanyscatours.payment.Payment;

public class PaymentLauncher {

    public static void main(String[] args) throws Exception {
        SCANode node = SCANodeFactory.newInstance().createSCANode(null,
                                                              locate("payment-groovy"),
                                                              locate("emailgateway"));
        node.start();
       
        SCAClient client = (SCAClient)node;
        Payment payment = client.getService(Payment.class, "Payment");

        System.out.println("Payment Groovy test");
        System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
       
        node.stop();
    }
View Full Code Here

        node.stop();
    }

    private static void runBindings() throws Exception {
        SCANode node =
            SCANodeFactory.newInstance().createSCANode("test-clients/bookings4-client.composite",
                                                       locate("usingsca"));

        node.start();

        Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings4Client");
        client.run();

        node.stop();
    }
View Full Code Here

        node.stop();
    }

    private static void runCarAutowire() throws Exception {
        SCANode node =
            SCANodeFactory.newInstance().createSCANode("test-clients/carbookings3-client.composite",
                                                       locate("usingsca"));

        node.start();

        Runnable client = ((SCAClient)node).getService(Runnable.class, "CarBookings3Client");
        client.run();

        node.stop();
    }
View Full Code Here

        node.stop();
    }

    private static void runCarPartner() throws Exception {
        SCANode node =
            SCANodeFactory.newInstance().createSCANode("test-clients/carbookings1-client.composite",
                                                       locate("usingsca"));

        node.start();

        Runnable client = ((SCAClient)node).getService(Runnable.class, "CarBookings1Client");
        client.run();

        node.stop();
    }
View Full Code Here

TOP

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

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.