From e766494b2c34ae0f7ae0f9da01deb66ea0b13de6 Mon Sep 17 00:00:00 2001 From: nash Date: Wed, 26 May 2010 15:57:39 +0000 Subject: Tag for travelsample-1.0-RC2 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@948485 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/scatours/CurrencyConverterRMIClient.java | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sca-java-1.x/tags/travelsample-1.0-RC2/clients/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMIClient.java (limited to 'sca-java-1.x/tags/travelsample-1.0-RC2/clients/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMIClient.java') diff --git a/sca-java-1.x/tags/travelsample-1.0-RC2/clients/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMIClient.java b/sca-java-1.x/tags/travelsample-1.0-RC2/clients/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMIClient.java new file mode 100644 index 0000000000..32e4fccfce --- /dev/null +++ b/sca-java-1.x/tags/travelsample-1.0-RC2/clients/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMIClient.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package scatours; + +import java.rmi.registry.LocateRegistry; +import java.rmi.registry.Registry; + +import com.tuscanyscatours.currencyconverter.CurrencyConverter; + +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"); + } +} -- cgit v1.2.3