// Path: DSRMI/src/main/java/dsrmi/interfaces/InformationRetrieval.java
// public interface InformationRetrieval extends java.rmi.Remote {
// 
//     String[] getCurrencies() throws java.rmi.RemoteException;
// 
//     float convertCurrency(String kod1, String kod2, float amount)
//             throws java.rmi.RemoteException;
// }


import dsrmi.interfaces.InformationRetrieval;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
package dsrmi.client;



public class RMIManager {

    private static RMIManager instance = null;

    private InformationRetrieval ir;

    public static RMIManager getInstance() {
        if (instance == null) {
            instance = new RMIManager();
        }
        return instance;
    }

    public void init(String host, int port) {
        try {
            Registry registry = LocateRegistry.getRegistry(host, port);
// Path: DSRMI/src/main/java/dsrmi/interfaces/InformationRetrieval.java
// public interface InformationRetrieval extends java.rmi.Remote {
// 
//     String[] getCurrencies() throws java.rmi.RemoteException;
// 
//     float convertCurrency(String kod1, String kod2, float amount)
//             throws java.rmi.RemoteException;
// }


// Path: DSRMI/src/main/java/dsrmi/client/RMIManager.java
import dsrmi.interfaces.InformationRetrieval;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

package dsrmi.client;



public class RMIManager {

    private static RMIManager instance = null;

    private InformationRetrieval ir;

    public static RMIManager getInstance() {
        if (instance == null) {
            instance = new RMIManager();
        }
        return instance;
    }

    public void init(String host, int port) {
        try {
            Registry registry = LocateRegistry.getRegistry(host, port);
            ir = (InformationRetrieval) registry.lookup("InformationRetrieval");