Package com.tuscanyscatours.currencyconverter

Examples of com.tuscanyscatours.currencyconverter.CurrencyConverter.convert()


        String ior = "corbaname::localhost:5080#CurrencyConverterCORBAService";
        Object obj = orb.string_to_object(ior);
        CurrencyConverter converter = CurrencyConverterHelper.narrow(obj);

        System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP"));
        System.out.println("100 USD = " + converter.convert("USD", "GBP", 100.0) + "GBP");
    }
}
View Full Code Here


        Registry registry = LocateRegistry.getRegistry("localhost", 8099);
        String name = "CurrencyConverterRMI";
        CurrencyConverter converter = (CurrencyConverter)registry.lookup(name);

        System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP"));
        System.out.println("100 USD = " + converter.convert("USD", "GBP", 100.0) + "GBP");
    }
}
View Full Code Here

        node.start();

        System.out.println("Quick currency converter test");
        CurrencyConverter converter = ((SCAClient)node).getService(CurrencyConverter.class, "CurrencyConverter");
        System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP"));
        System.out.println("100 USD = " + converter.convert("USD", "GBP", 100) + "GBP");

        System.out.println("Node started - Press enter to shutdown.");
        System.in.read();
        node.stop();
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.