116117118119120121122123124125126
node.start(); Runnable client = ((SCAClient)node).getService(Runnable.class, "Orders1Client"); client.run(); node.stop(); } private static void runComplexPropertyType() throws Exception { SCANode node = SCANodeFactory.newInstance().createSCANode("test-clients/orders2-client.composite",
129130131132133134135136137138139
node.start(); Runnable client = ((SCAClient)node).getService(Runnable.class, "Orders2Client"); client.run(); node.stop(); } private static void runCurrencyConverter() throws Exception { SCANode node = SCANodeFactory.newInstance().createSCANode("test-clients/converter-client.composite",
142143144145146147148149150151152
node.start(); Runnable client = ((SCAClient)node).getService(Runnable.class, "ConverterClient"); client.run(); node.stop(); } private static void runMultiDomain() throws Exception { SCANode hotelsNode = SCANodeFactory.newInstance().createSCANode("test-clients/hotelsdomain-client.composite",
161162163164165166167168169170171
Runnable hotelsClient = ((SCAClient)hotelsNode).getService(Runnable.class, "HotelsDomainClient"); hotelsClient.run(); Runnable toursClient = ((SCAClient)toursNode).getService(Runnable.class, "ToursDomainClient"); toursClient.run(); toursNode.stop(); hotelsNode.stop(); } private static void runTripAutowire() throws Exception { SCANode node =
175176177178179180181182183184185
node.start(); Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings3Client"); client.run(); node.stop(); } private static void runTripBooking() throws Exception { SCANode node = SCANodeFactory.newInstance().createSCANode("test-clients/bookings1-client.composite",
188189190191192193194195196197198
node.start(); Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings1Client"); client.run(); node.stop(); } private static void runTripWireElement() throws Exception { SCANode node = SCANodeFactory.newInstance().createSCANode("test-clients/bookings2-client.composite",
201202203204205206207208
node.start(); Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings2Client"); client.run(); node.stop(); } }
484950515253545556
String subject = "Holiday payment taken"; String message = "Payment of £102.37 accepted..."; notification.notify(accountID, subject, message); System.out.println("Notification sent"); } finally { node.stop(); } } }
4445464748495051
Runnable client = ((SCAClient)node1).getService(Runnable.class, "TestClient/Runnable"); client.run(); node1.stop(); node2.stop(); } }
4041424344454647
System.out.println("Payment Java 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(); } }