Package com.tuscanyscatours.currencyconverter

Examples of com.tuscanyscatours.currencyconverter.CurrencyConverter


        String[] orbArgs = {"-ORBInitialPort", "5080"};
        ORB orb = ORB.init(orbArgs, null);

        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


public class CurrencyConverterRMIClient {

    public static void main(String[] args) throws Exception {
        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

                                                       currencyContribution,
                                                       currencyRMIContribution);
        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

Related Classes of com.tuscanyscatours.currencyconverter.CurrencyConverter

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.