public static void main(String args[]) { try { SetupDataClient a = new SetupDataClient(); System.out.print(rmiServer.getImageHeight("map.jpg")); System.out.print(rmiServer.getImageWidth("map.jpg")); System.out.print(rmiServer.getMapImage()); } catch (RemoteException e) { System.out.println(e.getMessage()); } catch (Exception e) { System.out.println(e.getMessage()); } }
/** * *************************************************************** * * @param ip * @param port * @return */ public ChordMessageInterface rmiChord(String ip, int port) { ChordMessageInterface chord = null; try { Registry registry = LocateRegistry.getRegistry(ip, port); chord = (ChordMessageInterface) (registry.lookup("Chord")); return chord; } catch (RemoteException e) { e.printStackTrace(); } catch (NotBoundException e) { e.printStackTrace(); } return null; }