Newer
Older
package ufrn.imd;
import ufrn.imd.controller.Controller;
import ufrn.imd.domain.Account;
import ufrn.imd.log.Log;
import ufrn.imd.message.Client;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import static ufrn.imd.nameSpace.NameSpace.HOST_DEPOSIT_SERVICE;
public class BankingClientApp {
public static void main(String[] args) throws MalformedURLException, NotBoundException, RemoteException {
final Integer PORT = 1097;
Log.info(BankingClientApp.class,
String.format("connecting with server in host %s", HOST_DEPOSIT_SERVICE)
);
Controller server = (Controller) Naming.lookup(HOST_DEPOSIT_SERVICE);
Client client = new Client(new Account(1, "222", 10.00));
Log.info(BankingClientApp.class, "registring user in the server");
server.registerClient(client);
}
}